feat: Add support for custom types and custom taxonomies#38
Draft
ToughCrab24 wants to merge 9 commits intomainfrom
Draft
feat: Add support for custom types and custom taxonomies#38ToughCrab24 wants to merge 9 commits intomainfrom
ToughCrab24 wants to merge 9 commits intomainfrom
Conversation
| ], | ||
| 'and' => [ | ||
| 'type' => [ 'list_of' => 'TaxonomyFilter' ], | ||
| 'and' => [ |
Collaborator
There was a problem hiding this comment.
Why do you h8 linting? 😛
Member
Author
There was a problem hiding this comment.
it was the linter that complained :D
|
I tried it, and it's break GraphQL IDE in wordpress admin. If I open the IDE only shows the loading indicator. |
Member
Author
|
@draxvint Can you try again with the latest on this branch https://github.com/wpengine/wp-graphql-filter-query/tree/add-support-for-custom-taxonomies |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reference: #37
Example: Given a CPT called
rabbitsthat has a custom taxonomy calledsportRetrieves a collection of
rabbitsfiltered by the custom taxonomy 'sport', with a filter on the taxonomy 'name' field for the term 'football'.Query Parameters:
filter: An object representing the filter to apply to the rabbit collection.
filter.sport.name: A string representing the name of the sport term to filter on.
Example:
{ rabbits(filter: {sport: {name: {eq: "football"}}}) { nodes { title } } }In this example, the query retrieves a collection of
rabbitsthat have the term 'football' associated with the custom taxonomy 'sport'. The nodes field specifies which fields to return for each rabbit, in this case just the title.