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"
    • Fields: camelCase
    • Input values: camelCase
    • Arguments: camelCase
    • Directives: camelCase
    • Enums: PascalCase
      • Forbidden prefixes: "Enum"
      • Forbidden suffixes: "Enum"
    • Unions
      • Forbidden prefixes: "Union"
      • Forbidden suffixes: "Union"
    • Enum values: SCREAMING_SNAKE_CASE
    • Interfaces
      • Forbidden prefixes: "Interface"
      • Forbidden suffixes: "Interface"
    • Query fields
      • Forbidden prefixes: ["query", "get", "list"]
      • Forbidden suffixes: "Query"
    • Mutation fields
      • Forbidden prefixes: ["mutation", "put", "post", "patch"]
      • Forbidden suffixes: "Mutation"
    • Subscription fields
      • Forbidden prefixes: "subscription"
      • Forbidden suffixes: "Subscription"
  • Usage of the @deprecated directive requires specifying the reason 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
Was this page helpful?