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:
fragment
query
mutation
subscription
Additional restrictions:
- Minimum items:
1
- Unique items:
true
Resources
Last updated on