# graphql-language-service

> The official, runtime independent Language Service for GraphQL

Latest version **5.7.0** (published 2026-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install graphql-language-service
pnpm add graphql-language-service
yarn add graphql-language-service
bun add graphql-language-service
```

Provides the command `graphql`.

## Health

**Score 80/100 (A)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.7.0 |
| Published | 2026-08-30 |
| First published | 2017-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 886.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 16906 |
| Maintainers | benjie, mjmahone, leebyron, i1g, schickling, acao, fb, kassens, orta, asiandrummer, lostplan, mgadda, ags- |
| Keywords | graphql, language service, LSP |

## Links

- npm: https://www.npmjs.com/package/graphql-language-service
- Repository: https://github.com/graphql/graphiql
- Homepage: https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service#readme
- Issues: https://github.com/graphql/graphiql/issues?q=issue+label:graphql-language-service
- npm.io page: https://npm.io/package/graphql-language-service

## Dependencies (3)

- [nullthrows](https://npm.io/package/nullthrows.md) ^1.0.0
- [debounce-promise](https://npm.io/package/debounce-promise.md) ^3.1.2
- [vscode-languageserver-types](https://npm.io/package/vscode-languageserver-types.md) ^3.17.1

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 5.7.0 (latest) — 2026-08-30
- 5.5.0-canary-be24c1cc.0 (canary) — 2025-07-17
- 5.1.7-alpha.0 (alpha) — 2023-06-20
- 3.0.2-alpha.3 (next) — 2020-09-11
- 5.6.0 — 2026-08-25
- 5.5.2 — 2026-06-06
- 5.5.1 — 2026-05-11
- 5.5.0 — 2025-07-17
- 5.5.0-canary-3c41e521.0 — 2025-07-17
- 5.5.0-canary-018f3c73.0 — 2025-07-17
- 5.5.0-canary-9b31b224.0 — 2025-07-17
- 5.5.0-canary-23fbed22.0 — 2025-07-17
- 5.5.0-canary-5028aa1e.0 — 2025-07-17
- 5.4.1-canary-3146c50f.0 — 2025-07-17
- 5.4.1-canary-235e2d75.0 — 2025-07-17
- … 276 more at https://npm.io/package/graphql-language-service/versions

## README

# `graphql-language-service`

[Changelog](https://github.com/graphql/graphiql/blob/main/packages/graphql-language-service/CHANGELOG.md)
|
[API Docs](https://graphiql-test.netlify.app/typedoc/modules/graphql_language_service.html)
| [Discord](https://discord.gg/wkQCKwazxj)

> **Note**: Still mostly experimental, however it depends mostly on stable
> libraries. **Migration Note**: As of 3.0.0, the LSP Server command line
> interface has been moved to
> [`graphql-language-service-cli`](../graphql-language-service-cli)

## Purpose

This package brings together all the dependencies for building out web or
desktop IDE services for the GraphQL Language.

It is named as such to match the convention of other vscode language services.

## Interface

Language Service Protocol (LSP) methods written in TypeScript used by
[`graphql-language-service-server`](https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-server),
[`monaco-graphql`](https://github.com/graphql/graphiql/tree/main/packages/monaco-graphql)
and
[`codemirror-graphql`](https://github.com/graphql/graphiql/tree/main/packages/codemirror-graphql).

The goal is to provide methods for creating
[Language Server Protocol](https://langserver.org) compliant services to be used
by an IDE plugin, a browser application or desktop application.

## Parser

A standalone online, immutable, dependency-free parser for
[GraphQL](https://graphql.org), used by the LSP interface methods.

With GraphQL.js 17, fragment variable definitions and fragment spread arguments
can be enabled for parsing, diagnostics, outlines, operation facts, autocomplete,
and hover information. Pass `experimentalFragmentArguments: true` through the
relevant language-service options. The feature defaults to `false` because the
connected GraphQL server must also support the experimental syntax.

## Utils

Various utilities

---
_Source: https://npm.io/package/graphql-language-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
