no-one-place-fragments
- Category:
Operations
- Rule name:
@graphql-eslint/no-one-place-fragments
- Requires GraphQL Schema:
false
ℹ️ - Requires GraphQL Operations:
true
ℹ️
Usage Examples
Incorrect
# eslint @graphql-eslint/no-one-place-fragments: 'error'
fragment UserFields on User {
id
}
{
user {
...UserFields
}
}
Correct
# eslint @graphql-eslint/no-one-place-fragments: 'error'
fragment UserFields on User {
id
}
{
user {
...UserFields
friends {
...UserFields
}
}
}
Resources
Last updated on