- Notifications
You must be signed in to change notification settings - Fork2
feat: Add support for custom types and custom taxonomies#38
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| ], | ||
| 'and' => [ | ||
| 'type' => ['list_of' =>'TaxonomyFilter' ], | ||
| 'and' => [ |
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.
Why do you h8 linting? 😛
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.
it was the linter that complained :D
draxvint commentedDec 13, 2023
I tried it, and it's break GraphQL IDE in wordpress admin. If I open the IDE only shows the loading indicator. |
@draxvint Can you try again with the latest on this branchhttps://github.com/wpengine/wp-graphql-filter-query/tree/add-support-for-custom-taxonomies |
Uh oh!
There was an error while loading.Please reload this page.
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.