unique-operation-name
✅ The "extends": "plugin:@graphql-eslint/operations-recommended"
property in a configuration file
enables this rule.
- Category:
Operations
- Rule name:
@graphql-eslint/unique-operation-name
- Requires GraphQL Schema:
false
ℹ️ - Requires GraphQL Operations:
true
ℹ️
Usage Examples
Incorrect
# eslint @graphql-eslint/unique-operation-name: 'error'
# foo.query.graphql
query user {
user {
id
}
}
# bar.query.graphql
query user {
me {
id
}
}
Correct
# eslint @graphql-eslint/unique-operation-name: 'error'
# foo.query.graphql
query user {
user {
id
}
}
# bar.query.graphql
query me {
me {
id
}
}
Resources
Last updated on