Skip to content

Quick Start

Install GraphQL Analyzer from the VS Code Marketplace, or Open VSX for VS Codium/Cursor.

Create a .graphqlrc.yml (or .graphqlrc.toml) in your project root:

schema: "schema.graphql"
documents: "src/**/*.{graphql,ts,tsx,vue,svelte,astro}"

Open any GraphQL file, TypeScript/JavaScript file, or Vue/Svelte/Astro component with embedded GraphQL. You’ll get:

  • Real-time validation — Instant feedback on errors
  • Go to definition — Jump to types, fragments, and fields
  • Find references — See all usages across your project
  • Hover information — Type details and descriptions

Add lint rules to your configuration:

schema: "schema.graphql"
documents: "src/**/*.{graphql,ts,tsx,vue,svelte,astro}"
extensions:
graphql-analyzer:
lint:
extends: recommended

The recommended preset enables rules that are objectively beneficial without being opinionated. See Linting Overview for details.

Install the CLI and run checks in your pipeline:

Terminal window
curl -fsSL https://raw.githubusercontent.com/trevor-scheer/graphql-analyzer/main/scripts/install.sh | sh
graphql check --format github

See CI/CD Integration for full examples.