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

[1.0] Move filtering on graphql connections under top-level "filter" key #1174

Closed
KyleAMathews opened this issue Jun 15, 2017 · 1 comment
Closed

Comments

@KyleAMathews
Copy link
Contributor

Should have done this awhile ago but just occurred to me earlier when I was explaining filtering on connections w/ GraphQL that it'd be much easier to understand if all fields you could filter on were under a "filter" key. That way the only top-level keys/fields would be skip, limit, sort, and filter. Much more straightforward to understand.

Also, sortBy should just be sort.

Also add connection fields before node fields as that's generally what you want to query in graphiql.

KyleAMathews added a commit that referenced this issue Jun 15, 2017
* Move connections to first as more often that's what you want

* Change 'sortBy' graphql connection operator to 'sort'

* Fix some colors on gatsbyjs.org

* Change 'groupBy' graphql connection field to 'group'

* Move all connection filter input arguments under a top-level field 'filter'

This both makes it easier to navigate the connection arguments as well
as protects against name collisions as if someone had a filter named
skip, limit, or sort (the other top-level input fields) then there'd be
a mysterious error.

* Update tests

* fix test

* Make node graphql type filtering work again
@KyleAMathews
Copy link
Contributor Author

Fixed in #1177

fabien0102 added a commit to fabien0102/gatsby-starter that referenced this issue Jun 17, 2017
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

No branches or pull requests

1 participant