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

feat: Add support for custom types and custom taxonomies #38

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ToughCrab24
Copy link
Member

@ToughCrab24 ToughCrab24 commented Apr 11, 2023

Reference: #37

Example: Given a CPT called rabbits that has a custom taxonomy called sport

Retrieves a collection of rabbits filtered 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 rabbits that 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.

],
'and' => [
'type' => [ 'list_of' => 'TaxonomyFilter' ],
'and' => [
Copy link
Collaborator

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? 😛

Copy link
Member Author

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

@ToughCrab24 ToughCrab24 changed the title Add support for custom types and custom taxonomies feat: Add support for custom types and custom taxonomies May 31, 2023
@draxvint
Copy link

I tried it, and it's break GraphQL IDE in wordpress admin. If I open the IDE only shows the loading indicator.

@ToughCrab24
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants