- Category:
Operations
- Rule name:
@graphql-eslint/unique-fragment-name
- Requires GraphQL Schema:
false
ℹ️ - Requires GraphQL Operations:
true
ℹ️
Enforce unique fragment names across your project.
# eslint @graphql-eslint/unique-fragment-name: 'error'
# user.fragment.graphql
fragment UserFields on User {
id
name
fullName
}
# user-fields.graphql
fragment UserFields on User {
id
}
# eslint @graphql-eslint/unique-fragment-name: 'error'
# user.fragment.graphql
fragment AllUserFields on User {
id
name
fullName
}
# user-fields.graphql
fragment UserFields on User {
id
}