GraphiQL Validation Rules? Plugin provided? #28984
Unanswered
acao
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Now that we have a prop for providing
ValidationRules
in GraphiQL, we can allow plugin developers or even users to configure how GraphiQL is validated. We could easily add the ability to register warnings as well.there are many general purpose rules available already:
https://github.com/graphql/graphql-js/tree/master/src/validation/rules
these are the ones enabled by default:
https://github.com/graphql/graphql-js/blob/661ff1a6b591eea1e7a7e7c9e6b8b2dcfabf3bd7/src/validation/specifiedRules.js#L100
relay still has graphql-js compatible validation rules related to edges and nodes and other relay concepts
we can also allow plugin authors to define their own, very specific ones, if that ever makes sense to do? if anyone has examples of ways they would like to validate Gatsby queries for errors or warnings in GraphiQL that would be awesome!
Beta Was this translation helpful? Give feedback.
All reactions