Lint Policy

Enforce conventions and best practices through the lint policy.

Schema linting capabilities enable developers to uphold GraphQL schema quality and adhere to established conventions effortlessly. By integrating schema linting into your development workflow, you can ensure consistency, enhance code maintainability, and catch issues early in the development process.

How to configure schema lintings

  • Navigate to the Lint Policy page on Cosmo.

  • Select the namespace.

  • Enable the linter.

  • Configure the lint rules and their respective severity levels once enabled.

Once the linter is enabled and the rules are configured, the lint check will be performed on every check operation of that namespace.

Severity Level

  • Error:- If any configured rules are violated, it causes the check operation to fail.

  • Warning:- If any configured rules are violated, they are flagged as warnings, but they don't cause the check operation to fail.

Last updated