Skip to content

Commit

Permalink
- Update namespaces to be WPGraphQL\Labs
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbahl committed Jan 20, 2022
1 parent 995f46a commit 3bf42cd
Show file tree
Hide file tree
Showing 19 changed files with 64 additions and 60 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "wordpress-plugin",
"autoload": {
"psr-4": {
"WPGraphQL\\PersistedQueries\\": "src/"
"WPGraphQL\\Labs\\": "src/"
}
},
"require-dev": {
Expand Down
20 changes: 13 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Admin/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries\Admin;
namespace WPGraphQL\Labs\Admin;

use WPGraphQL\PersistedQueries\AdminErrors;
use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\PersistedQueries\Document\Grant;
use WPGraphQL\PersistedQueries\Document\MaxAge;
use WPGraphQL\Labs\AdminErrors;
use WPGraphQL\Labs\Document;
use WPGraphQL\Labs\Document\Grant;
use WPGraphQL\Labs\Document\MaxAge;
use GraphQL\Error\SyntaxError;
use GraphQL\Server\RequestError;

Expand Down
4 changes: 2 additions & 2 deletions src/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries\Admin;
namespace WPGraphQL\Labs\Admin;

use WPGraphQL\PersistedQueries\Document\Grant;
use WPGraphQL\Labs\Document\Grant;

class Settings {

Expand Down
4 changes: 2 additions & 2 deletions src/AdminErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries;
namespace WPGraphQL\Labs;

use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\Labs\Document;

class AdminErrors {

Expand Down
8 changes: 4 additions & 4 deletions src/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries;
namespace WPGraphQL\Labs;

use WPGraphQL\PersistedQueries\Admin\Settings;
use WPGraphQL\PersistedQueries\AdminErrors;
use WPGraphQL\PersistedQueries\Utils;
use WPGraphQL\Labs\Admin\Settings;
use WPGraphQL\Labs\AdminErrors;
use WPGraphQL\Labs\Utils;
use GraphQL\Error\SyntaxError;
use GraphQL\Server\RequestError;

Expand Down
4 changes: 2 additions & 2 deletions src/Document/Description.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries\Document;
namespace WPGraphQL\Labs\Document;

use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\Labs\Document;

class Description {

Expand Down
8 changes: 4 additions & 4 deletions src/Document/Grant.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries\Document;
namespace WPGraphQL\Labs\Document;

use WPGraphQL\PersistedQueries\Admin\Settings;
use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\PersistedQueries\ValidationRules\AllowDenyQueryDocument;
use WPGraphQL\Labs\Admin\Settings;
use WPGraphQL\Labs\Document;
use WPGraphQL\Labs\ValidationRules\AllowDenyQueryDocument;
use GraphQL\Server\RequestError;

class Grant {
Expand Down
4 changes: 2 additions & 2 deletions src/Document/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries\Document;
namespace WPGraphQL\Labs\Document;

use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\Labs\Document;
use GraphQL\Server\RequestError;

class Loader {
Expand Down
8 changes: 4 additions & 4 deletions src/Document/MaxAge.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries\Document;
namespace WPGraphQL\Labs\Document;

use WPGraphQL\PersistedQueries\Admin\Settings;
use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\PersistedQueries\Utils;
use WPGraphQL\Labs\Admin\Settings;
use WPGraphQL\Labs\Document;
use WPGraphQL\Labs\Utils;
use GraphQL\Server\RequestError;

class MaxAge {
Expand Down
2 changes: 1 addition & 1 deletion src/GraphiQL/GraphiQL.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace WPGraphQL\PersistedQueries\GraphiQL;
namespace WPGraphQL\Labs\GraphiQL;

class GraphiQL {
public function init() {
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries;
namespace WPGraphQL\Labs;

class Utils {

Expand Down
8 changes: 4 additions & 4 deletions src/ValidationRules/AllowDenyQueryDocument.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace WPGraphQL\PersistedQueries\ValidationRules;
namespace WPGraphQL\Labs\ValidationRules;

use GraphQL\Error\Error;
use GraphQL\Language\AST\NodeKind;
use GraphQL\Language\AST\DocumentNode;
use GraphQL\Validator\Rules\ValidationRule;
use GraphQL\Validator\ValidationContext;

use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\PersistedQueries\Document\Grant;
use WPGraphQL\PersistedQueries\Utils;
use WPGraphQL\Labs\Document;
use WPGraphQL\Labs\Document\Grant;
use WPGraphQL\Labs\Utils;

/**
* Class AllowOrDenyQuery
Expand Down
4 changes: 2 additions & 2 deletions tests/wpunit/AdminSettingsCacheTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace WPGraphQL\PersistedQueries;
namespace WPGraphQL\Labs;

use WPGraphQL\PersistedQueries\Admin\Settings;
use WPGraphQL\Labs\Admin\Settings;

/**
* Test the wp-graphql request to cached query is faster
Expand Down
8 changes: 4 additions & 4 deletions tests/wpunit/AllowDenyQueryRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
*
*/

namespace WPGraphQL\PersistedQueries;
namespace WPGraphQL\Labs;

use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\PersistedQueries\Document\Grant;
use WPGraphQL\PersistedQueries\Utils;
use WPGraphQL\Labs\Document;
use WPGraphQL\Labs\Document\Grant;
use WPGraphQL\Labs\Utils;

class AllowDenyQueryRulesTest extends \Codeception\TestCase\WPTestCase {

Expand Down
2 changes: 1 addition & 1 deletion tests/wpunit/CacheIsFasterTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace WPGraphQL\PersistedQueries;
namespace WPGraphQL\Labs;

use SebastianBergmann\Timer\Timer;
use SebastianBergmann\Timer\Duration;
Expand Down
2 changes: 1 addition & 1 deletion tests/wpunit/MutationCreateDocumentTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace WPGraphQL\PersistedQueries;
namespace WPGraphQL\Labs;

class MutationCreateDocumentTest extends \Codeception\TestCase\WPTestCase {

Expand Down
4 changes: 2 additions & 2 deletions tests/wpunit/UtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* @package Wp_Graphql_Persisted_Queries
*/

namespace WPGraphQL\PersistedQueries;
namespace WPGraphQL\Labs;

use WPGraphQL\PersistedQueries\Utils;
use WPGraphQL\Labs\Utils;

/**
* Test the content class
Expand Down
20 changes: 9 additions & 11 deletions wp-graphql-labs.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
* Persisted Queries and Caching
*/

namespace WPGraphQL\Labs;

use WPGraphQL\PersistedQueries\AdminErrors;
use WPGraphQL\PersistedQueries\Document;
use WPGraphQL\PersistedQueries\Admin\Editor;
use WPGraphQL\PersistedQueries\Admin\Settings;
use WPGraphQL\PersistedQueries\Document\Description;
use WPGraphQL\PersistedQueries\Document\Grant;
use WPGraphQL\PersistedQueries\Document\MaxAge;
use WPGraphQL\PersistedQueries\GraphiQL\GraphiQL;
use WPGraphQL\Labs\AdminErrors;
use WPGraphQL\Labs\Document;
use WPGraphQL\Labs\Admin\Editor;
use WPGraphQL\Labs\Admin\Settings;
use WPGraphQL\Labs\Document\Description;
use WPGraphQL\Labs\Document\Grant;
use WPGraphQL\Labs\Document\MaxAge;
use WPGraphQL\Labs\GraphiQL\GraphiQL;

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
Expand All @@ -37,7 +35,7 @@
'graphql_server_config',
function ( \GraphQL\Server\ServerConfig $config ) {
$config->setPersistentQueryLoader(
[ '\WPGraphQL\PersistedQueries\Document\Loader', 'by_query_id' ]
[ '\WPGraphQL\Labs\Document\Loader', 'by_query_id' ]
);
},
10,
Expand Down

0 comments on commit 3bf42cd

Please sign in to comment.