Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature/#381 - Selected Terms in TermObjectConnection queries #387
Your checklist for this pull request
What does this implement/fix? Explain your changes.
This fixes term connection fields on PostObjects, to allow for flexibility in querying only "selected" items, and displaying in a flat list vs. hierarchical list.
This adds 2 new arguments to TermObjectConnection fields:
Does this close any currently open issues?
Any relevant logs, error output, GraphiQL screenshots, etc?
This is technically a breaking change, however it's relatively minor.
The input types for connection arguments have changed, so if you used variables in your queries before, they will need to be updated to reflect the change.
You can check the changes in this PR that were made to the test files to see how minor the changes were to have unit tests pass still.
Where has this been tested?
@cr101 You should be able to get the selected items by setting both new arguments to true, like:
You can see the query returning the 3 selected categories, but not the unselected one.
Here's some screenshots showing this: