lone-executable-definition
- Category:
Operations - Rule name:
@graphql-eslint/lone-executable-definition - Requires GraphQL Schema:
falseℹ️ - Requires GraphQL Operations:
falseℹ️
Usage Examples
Incorrect
# eslint @graphql-eslint/lone-executable-definition: 'error'
query Foo {
id
}
fragment Bar on Baz {
id
}Correct
# eslint @graphql-eslint/lone-executable-definition: 'error'
query Foo {
id
}Config Schema
The schema defines the following properties:
ignore (array)
Allow certain definitions to be placed alongside others.
The elements of the array can contain the following enum values:
fragmentquerymutationsubscription
Additional restrictions:
- Minimum items:
1 - Unique items:
true