Troubleshooting
No diagnostics showing
Section titled “No diagnostics showing”Check your config exists:
ls -la .graphqlrc.ymlVerify document patterns match your files:
documents: "src/**/*.graphql" # Must match your file locationsVerify schema file exists:
ls -la schema.graphql # Or whatever path is in your configLSP not starting
Section titled “LSP not starting”VS Code: Check Output panel → “GraphQL Language Server” for errors.
Neovim: Run :LspLog to see LSP output.
Enable debug logging:
{ "graphql-analyzer.debug.logLevel": "debug", "graphql-analyzer.server.env": { "RUST_LOG": "debug" }}Configuration not found
Section titled “Configuration not found”The tool searches for config files walking up the directory tree. Ensure your .graphqlrc.yml is at or above your workspace root.
Supported file names (in priority order):
.graphqlrc.yml/.graphqlrc.yaml.graphqlrc.json.graphqlrc.toml.graphqlrc(YAML or JSON, auto-detected)graphql.config.yml/graphql.config.yamlgraphql.config.jsongraphql.config.tomlpackage.jsonwith a"graphql"key (lowest priority fallback)
Not supported: graphql.config.js, graphql.config.ts
Schema loading errors
Section titled “Schema loading errors”RUST_LOG=debug graphql validateLook for schema loading errors in the output. Common causes:
- File path in config doesn’t match actual file location
- Glob pattern doesn’t match any files
- Remote URL is unreachable
Embedded GraphQL not working
Section titled “Embedded GraphQL not working”The tag function must be imported from a recognized module:
// ✅ Worksimport { gql } from "graphql-tag";
// ❌ Won't work — unknown moduleimport { gql } from "custom-unknown-module";Add custom modules:
extensions: graphql-analyzer: extractConfig: modules: - "graphql-tag" - { name: "custom-module", identifier: "gql" }Setting identifier constrains which export from the module is recognized as the GraphQL tag (matches @graphql-tools/graphql-tag-pluck semantics). Omit it to accept any default import from that module.
Performance issues
Section titled “Performance issues”See Performance Tuning.
Quick fixes:
- Disable expensive rules in the LSP:
noUnusedFields: off - Check document patterns aren’t matching too many files
- Ensure
node_modulesisn’t included in document patterns
Reporting issues
Section titled “Reporting issues”File issues at GitHub Issues.
Include:
- Your
.graphqlrc.ymlconfiguration - GraphQL Analyzer version
- Editor and OS
- Debug logs if applicable