check
The check command runs both validation and linting together. This is the recommended command for most workflows — it’s more efficient than running validate and lint separately.
graphql check [OPTIONS]Options
Section titled “Options”| Option | Description |
|---|---|
-f, --format <FORMAT> | Output format: human (default), json, github, sarif |
-w, --watch | Watch for file changes and re-check |
--max-warnings <N> | Maximum number of warnings allowed before returning a non-zero exit code (exit code 6) |
Examples
Section titled “Examples”# Run all checks (recommended)graphql check
# JSON output for CIgraphql check --format json
# Watch mode for developmentgraphql check --watch
# Specific projectgraphql --project backend checkExit codes
Section titled “Exit codes”0— No validation or lint errors1— Errors found6— Warning threshold exceeded (--max-warnings)