✅ The "extends": "plugin:@graphql-eslint/operations-recommended"
property in a configuration file enables this rule.
- 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.
# eslint @graphql-eslint/no-anonymous-operations: 'error'
query {
# ...
}
# eslint @graphql-eslint/no-anonymous-operations: 'error'
query user {
# ...
}