no-anonymous-operations
â
The "extends": "plugin:@graphql-eslint/operations-recommended"
property in a configuration file
enables this rule.
đĄ This rule provides suggestions (opens in a new tab)
- Category:
Operations
- Rule name:
@graphql-eslint/no-anonymous-operations
- Requires GraphQL Schema:
false
âšī¸ - Requires GraphQL Operations:
false
âšī¸
Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes.
Usage Examples
Incorrect
# eslint @graphql-eslint/no-anonymous-operations: 'error'
query {
# ...
}
Correct
# eslint @graphql-eslint/no-anonymous-operations: 'error'
query user {
# ...
}