Skip to content

VS Code

The VS Code extension bundles the LSP server — no separate installation needed. It works immediately after installation.

Install GraphQL Analyzer from the VS Code Marketplace, or search “GraphQL Analyzer” in the Extensions view (Ctrl/Cmd+Shift+X).

For VS Codium, Cursor, Windsurf, and other VS Code-compatible editors, install from the Open VSX Registry.

Manual: Download the .vsix for your platform from the releases page and install with code --install-extension <file>.vsix.

Create a .graphqlrc.yml in your project root:

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

The extension activates automatically when a .graphqlrc.* or graphql.config.* file is detected in your workspace root.

{
// Log LSP requests and responses to the output channel
"graphql-analyzer.lsp.trace": true,
// Custom path to LSP server binary (optional)
"graphql-analyzer.server.path": "/path/to/graphql-lsp",
// Environment variables for the LSP server
"graphql-analyzer.server.env": {
"RUST_LOG": "debug"
},
// Server log verbosity: "error", "warn", "info", "debug"
"graphql-analyzer.debug.logLevel": "warn"
}
  • Real-time validation — Errors appear as you type
  • Go to definitionF12 on fragments, types, fields, variables, directives
  • Find references — Right-click → Find All References
  • Hover — Type information and descriptions
  • Embedded GraphQL — Full support in TypeScript/JavaScript, Vue, Svelte, and Astro files
CommandDescription
graphql-analyzer.restartServerRestart LSP server
graphql-analyzer.jumpToLogsShow server logs
graphql-analyzer.checkStatusCheck server status
graphql-analyzer.reportIssueReport an issue
graphql-analyzer.testOtelConnectionTest OpenTelemetry Connection
graphql-analyzer.startTraceStart performance trace
graphql-analyzer.stopTraceStop performance trace

Access via Command Palette (Ctrl/Cmd+Shift+P).

The extension includes a pre-compiled LSP server binary for:

  • macOS (Intel and Apple Silicon)
  • Linux (x86_64 and ARM64)
  • Windows (x86_64)

Extension not working?

  1. Open the Output panel (View → Output)
  2. Select “graphql-analyzer Debug” from the dropdown (or “graphql-analyzer LSP” for raw LSP traffic)
  3. Look for errors

Common fixes:

  • Ensure .graphqlrc.yml exists in your workspace root
  • Verify schema file path is correct
  • Check that document patterns match your files
  • Reload the window (Ctrl/Cmd+Shift+P → “Developer: Reload Window”)

Enable debug logging:

{
"graphql-analyzer.debug.logLevel": "debug",
"graphql-analyzer.server.env": {
"RUST_LOG": "debug"
}
}

See Troubleshooting for more.