Lint Checks
Lint checks are a layer of our schema checks suite that statically analyzes your schema and finds various issues that aren't hard compilation errors but are likely to be mistakes, oversights or behaviors you've chosen to disallow.
- 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
@deprecated
directive requires specifying thereason
argument
- When running schema checks in the CLI via the
grafbase check
command or viewing schema checks in the dashboard, lint checks are run if validation and composition checks pass - The CLI
grafbase lint
command will run lint checks locally on a provided SDL schema