graphql-lint
A Rust based linter for GraphQL SDL schemas.
graphql-lint is used in the Grafbase Platform and CLI.
Currently Supported Lints
- Naming conventions
- Types:
PascalCase- Forbidden prefixes:
"Type" - Forbidden suffixes:
"Type"
- Forbidden prefixes:
- Fields:
camelCase - Input values:
camelCase - Arguments:
camelCase - Directives:
camelCase - Enums:
PascalCase- Forbidden prefixes:
"Enum" - Forbidden suffixes:
"Enum"
- Forbidden prefixes:
- Unions
- Forbidden prefixes:
"Union" - Forbidden suffixes:
"Union"
- Forbidden prefixes:
- Enum values:
SCREAMING_SNAKE_CASE - Interfaces
- Forbidden prefixes:
"Interface" - Forbidden suffixes:
"Interface"
- Forbidden prefixes:
- Query fields
- Forbidden prefixes:
["query", "get", "list"] - Forbidden suffixes:
"Query"
- Forbidden prefixes:
- Mutation fields
- Forbidden prefixes:
["mutation", "put", "post", "patch"] - Forbidden suffixes:
"Mutation"
- Forbidden prefixes:
- Subscription fields
- Forbidden prefixes:
"subscription" - Forbidden suffixes:
"Subscription"
- Forbidden prefixes:
- Types:
- Usage of the
@deprecateddirective requires specifying thereasonargument
Usage
[]
= "0.1.3"
use lint;