-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
fix: Connections need to connect to Types that implement the Node interface #675
Merged
kidunot89
merged 15 commits into
wp-graphql:develop
from
jasonbahl:bug/filter-out-extensions
Dec 7, 2022
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b2cc531
- implement Node on different Types
jasonbahl 6c1a37b
- update class-customers to return arrays for edges and nodes
jasonbahl bf07d0b
- return empty arrays for edges/nodes for coupon connections
jasonbahl 9ca43f2
- remove manual registration of the `Product` Interface
jasonbahl 78241bd
- fix code style
jasonbahl 3597854
- fix code style
jasonbahl 2132482
- no longer pass type registry to Product::register_interface()
jasonbahl 2a3b4b4
- use post type registry to register the Product type as an Interface
jasonbahl 72228a6
WPGraphQL v1.13.x support added.
kidunot89 d0d4d1a
WPGraphQL v1.13.x support added.
kidunot89 ce4bc43
fix: filter corrected.
kidunot89 e61047a
fix: Needed code restored
kidunot89 c8abe9f
fix: Needed code restored
kidunot89 f6bc929
parent field no longer overwritten
kidunot89 5d81c14
chore: WPCS compliance met.
kidunot89 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ public static function register_interface( &$type_registry ) { | |
'ProductAttribute', | ||
[ | ||
'description' => __( 'Product attribute object', 'wp-graphql-woocommerce' ), | ||
'interfaces' => [ 'Node' ], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces must be used to indent lines; tabs are not allowed |
||
'fields' => self::get_fields(), | ||
'resolveType' => function( $value ) use ( &$type_registry ) { | ||
if ( $value->is_taxonomy() ) { | ||
|
@@ -45,9 +46,6 @@ public static function get_fields() { | |
'id' => [ | ||
'type' => [ 'non_null' => 'ID' ], | ||
'description' => __( 'Attribute Global ID', 'wp-graphql-woocommerce' ), | ||
'resolve' => function ( $attribute ) { | ||
return ! empty( $attribute->_relay_id ) ? $attribute->_relay_id : null; | ||
}, | ||
], | ||
'attributeId' => [ | ||
'type' => [ 'non_null' => 'Int' ], | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces must be used to indent lines; tabs are not allowed