You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, eslint-plugin-graphql will check gql tagged templates against a provided schema. However, there are a certain set of "optional" GraphQL parameters that aren't a part of the schema but would be handy rules to lint against anyway.
For example, specifying the operationName is a very useful tool for "tagging" your GraphQL queries (see @stubailo's explanation here). Having a lint rule that allowed you to optionally enforce a unique operation name would help make this more widespread (should you choose to enable it).
Additionally, depending on which GraphQL client you use, naming your fragments may be a necessary part of the developer workflow - having the eslint-plugin-graphql lint to make sure you're naming your fragments would be useful.
In both cases, it might even be nice to establish a format for that name, given the module or component name (in React).
Is this a problem you've faced while using GraphQL?
The text was updated successfully, but these errors were encountered:
Agreed, having a lint rule to enforce queries have an operationName would be great. We rely on operationNames for performance logging, so we definitely want to avoid nameless queries creeping into our codebase.
Currently,
eslint-plugin-graphql
will checkgql
tagged templates against a provided schema. However, there are a certain set of "optional" GraphQL parameters that aren't a part of the schema but would be handy rules to lint against anyway.For example, specifying the operationName is a very useful tool for "tagging" your GraphQL queries (see @stubailo's explanation here). Having a lint rule that allowed you to optionally enforce a unique operation name would help make this more widespread (should you choose to enable it).
Additionally, depending on which GraphQL client you use, naming your fragments may be a necessary part of the developer workflow - having the
eslint-plugin-graphql
lint to make sure you're naming your fragments would be useful.In both cases, it might even be nice to establish a format for that name, given the module or component name (in React).
Is this a problem you've faced while using GraphQL?
The text was updated successfully, but these errors were encountered: