Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPGraphQL v2.0 (DRAFT) #1936

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fc71c30
- ignore nested wp-graphql directory used for CI
jasonbahl Mar 1, 2021
aefe23f
- Update graphql-php to v14.5.1
jasonbahl Mar 1, 2021
424edb9
- update priorities of access function hooks so that Types are availa…
jasonbahl Mar 11, 2021
3f0527d
- Update composer.lock to reflect updates to dependencies
jasonbahl Mar 11, 2021
47c216c
- update CLI script to allow output dir to be defined for generating …
jasonbahl Mar 11, 2021
5636613
- Update WPObjectType to support passing connections in the Type regi…
jasonbahl Mar 11, 2021
46f621e
- Update WPInterfaceType to support passing interfaces that can be im…
jasonbahl Mar 11, 2021
1782893
- Update Term model to have a databaseId field so that it can properl…
jasonbahl Mar 11, 2021
5caf229
- Update the User Model to include a databaseId field so it can work …
jasonbahl Mar 11, 2021
66532cd
- Deleted several Connection/$name.php files and moved the connection…
jasonbahl Mar 11, 2021
efa25a3
Merge branch 'develop' into feature/#1751-update-graphql-php-to-14.5.1
jasonbahl Mar 25, 2021
0c19cd8
Merge branch 'develop' into feature/#1751-update-graphql-php-to-14.5.1
jasonbahl Jun 1, 2021
8c43f5c
- Update GraphQL-PHP in composer.json (it got reverted when merging)
jasonbahl Jun 1, 2021
900c753
- Add `SingelNodeConnectionEdge` Interface which is implemented by al…
jasonbahl Jun 2, 2021
85cd960
- Remove MenuItemObjectUnion file
jasonbahl Jun 7, 2021
7e9482b
- Add the following Interfaces: CommentConnection, CommenterConnectio…
jasonbahl Jun 9, 2021
5e572ae
- Update docblocks
jasonbahl Jun 9, 2021
bdae69b
Merge branch 'develop' into feature/#1751-update-graphql-php-to-14.5.1
jasonbahl Jun 9, 2021
644e5c6
- Add `TaxonomyConnection` to connection registration for taxonomy co…
jasonbahl Jun 9, 2021
188a0c1
- Update docblocks
jasonbahl Jun 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/schema-linter.yml
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Lint the Static Schema
run: |
graphql-schema-linter --except=relay-connection-types-spec,relay-page-info-spec --ignore '{"defined-types-are-used":["MenuItemsWhereArgs","PostObjectUnion","TermObjectUnion","TimezoneEnum"]}' /tmp/schema.graphql
graphql-schema-linter --except=relay-connection-types-spec --ignore '{"defined-types-are-used":["MenuItemsWhereArgs","PostObjectUnion","TermObjectUnion","TimezoneEnum"]}' /tmp/schema.graphql

- name: Display ignored linting errors
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,6 +9,7 @@ plugin-build
!src/Admin/GraphiQL/app/build
coverage/*
schema.graphql
wp-graphql/
phpcs.xml
phpunit.xml
docker-output
Expand Down
2 changes: 1 addition & 1 deletion access-functions.php
Expand Up @@ -406,7 +406,7 @@ function deregister_graphql_field( string $type_name, string $field_name ) {
function( TypeRegistry $type_registry ) use ( $type_name, $field_name ) {
$type_registry->deregister_field( $type_name, $field_name );
},
10
5
);
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -23,7 +23,7 @@
],
"require": {
"php": ">=7.1.0",
"webonyx/graphql-php": "14.4.0",
"webonyx/graphql-php": "14.5.1",
"ivome/graphql-relay-php": "0.5.0"
},
"require-dev": {
Expand Down
86 changes: 43 additions & 43 deletions composer.lock

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

49 changes: 0 additions & 49 deletions src/Connection/Commenter.php

This file was deleted.

13 changes: 7 additions & 6 deletions src/Connection/Comments.php
Expand Up @@ -121,13 +121,14 @@ public static function register_connections() {
*
* @return array
*/
public static function get_connection_config( $args = [] ) {
public static function get_connection_config( array $args = [] ) {
$defaults = [
'fromType' => 'RootQuery',
'toType' => 'Comment',
'fromFieldName' => 'comments',
'connectionArgs' => self::get_connection_args(),
'resolve' => function( $root, $args, $context, $info ) {
'fromType' => 'RootQuery',
'toType' => 'Comment',
'connectionInterfaces' => [ 'CommentConnection' ],
'fromFieldName' => 'comments',
'connectionArgs' => self::get_connection_args(),
'resolve' => function( $root, $args, $context, $info ) {
return DataSource::resolve_comments_connection( $root, $args, $context, $info );
},
];
Expand Down