Official language service for GraphQL, providing LSP-compatible methods for IDEs and editors. Version 5.5.2 supports GraphQL 15.x, 16.x, and 17.x. Maintained by the GraphiQL team, it offers parser, utilities, and interface for building GraphQL IDE features. Includes autocompletion, diagnostics, hover info, go-to-definition, and document symbols. Still somewhat experimental but built on stable libraries. Key differentiator: standalone and runtime independent, designed for use in both Node and browser environments.
npm install graphql-language-serviceNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to set up a schema, create a GraphQL cache, and retrieve autocomplete suggestions for a query.
Import from 'graphql-language-service-cli' for command line usage.
Always pass a valid schema object to the constructor.
Use { line: number, column: number } format.Upgrade graphql peer dependency to ^15.5.0 || ^16.0.0 || ^17.0.0
Use import syntax or configure bundler to handle ESM.
npm install graphql-language-service graphql
Use import { getAutocompleteSuggestions } from 'graphql-language-service'Check GraphQL schema string for correctness.