match-document-filename
This rule allows you to enforce that the file name should match the operation name.
- Category:
Operations - Rule name:
@graphql-eslint/match-document-filename - Requires GraphQL Schema:
falseℹ️ - Requires GraphQL Operations:
falseℹ️
This rule allows you to enforce that the file name should match the operation name.
Usage Examples
Correct
Correct
Correct
Correct
Incorrect
Incorrect
Correct
Correct
Config Schema
The schema defines the following properties:
fileExtension (enum)
This element must be one of the following enum values:
.gql.graphql
query
The object must be one of the following types:
asStringasObject
mutation
The object must be one of the following types:
asStringasObject
subscription
The object must be one of the following types:
asStringasObject
fragment
The object must be one of the following types:
asStringasObject
Sub Schemas
The schema defines the following additional types:
asString (enum)
One of: camelCase, PascalCase, snake_case, UPPER_CASE, kebab-case, matchDocumentStyle
asObject (object)
Properties of the asObject object:
style (enum)
One of: camelCase, PascalCase, snake_case, UPPER_CASE, kebab-case, matchDocumentStyle
This element must be one of the following enum values:
camelCasePascalCasesnake_caseUPPER_CASEkebab-casematchDocumentStyle