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âšī¸
Enforce unique operation names across your project.
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
}
}