Skip to main content

Naming Convention

These rules enforce naming conventions.
Field names should always use camelCase.
Violation
Correct:
Correct
Type names should always use PascalCase.
Violation
Correct
A type’s name should never be prefixed with ‘Type’.
Violation
Correct
A type’s name should never be suffixed with ‘Type’.
Violation
Correct
An input’s name should never be prefixed with ‘Input’.
Violation
Correct
An input’s name should always be suffixed with ‘Input’.
Violation
Correct
An enum’s name should never be prefixed with ‘Enum’.
Violation
Correct
An enum’s name should never be suffixed with ‘Enum’.
Violation
Correct
An interface type’s name should never be prefixed with ‘Interface’.
Violation
Correct
An interface type’s name should never be suffixed with ‘Interface’.
Violation
Correct
Enum values should always use UPPER_CASE.
Violation
Correct

Alphabetical Sort

These rules enforce the arrangement of types, fields and so on in the schema.
Ensures all fields are sorted in alphabetical order.
Violation
Correct
Ensures all enum values are sorted in alphabetical order.
Violation
Correct
Ensures all definitions are sorted in alphabetical order.Violation:
Violation
Correct:
Correct

Others

Ensures all type definitions are accompanied by a description.The types include:-
  • ObjectTypeDefinition
  • InterfaceTypeDefinition
  • EnumTypeDefinition
  • ScalarTypeDefinition
  • InputObjectTypeDefinition
  • UnionTypeDefinition
Violation
Correct
Ensures enum values eliminate duplicates by disallowing case insensitivity.
Violation
Correct
Ensures field names do not include their type’s name as a prefix.
Violation
Correct
Requires providing a reason for the @deprecated directive.
Violation
Correct
Requires providing a deletion date for the @deprecated directive.
Violation
Correct