unique-operation-name
- 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
}
}