Skip to content

Performance Tuning

GraphQL Analyzer uses Salsa for incremental computation. When a file changes, only the queries that depend on that file are recomputed. Everything else is served from cache.

Edit one file out of 100 → Only that file is re-validated
Edit schema → All documents re-validated (schema is a shared dependency)
AspectLSP (editor)CLI (CI/CD)
Update modelIncremental per-fileFull batch
Rule budgetFast rules onlyAll rules
Typical latencyMillisecondsSeconds

Project-wide rules like noUnusedFields and noUnusedFragments analyze all documents together and can be slow in very large projects. If you experience latency in the editor, disable them in your config and run them in CI instead:

extensions:
graphql-analyzer:
lint:
extends: recommended
rules:
noUnusedFields: off
noUnusedFragments: off

Then in CI, enable them explicitly:

Terminal window
graphql check --rule noUnusedFields=error --rule noUnusedFragments=error

The analyzer separates schema structure (type definitions) from operation bodies. This means:

  • Editing an operation doesn’t recompute schema analysis
  • Editing the schema recomputes everything that depends on types
  • Fragment indexes are stable across operation edits

This is key to keeping the IDE responsive in large codebases.

In VS Code settings (Preferences: Open User Settings (JSON)):

{
"graphql-analyzer.debug.otelEnabled": true,
"graphql-analyzer.debug.otelEndpoint": "http://localhost:4317"
}

4317 is the OTLP gRPC ingestion endpoint (the collector). View traces in Jaeger’s UI at http://localhost:16686 (requires Jaeger running locally — these are two different ports with different purposes).

In VS Code settings:

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

For the CLI:

Terminal window
RUST_LOG=debug graphql validate