Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

graphql-language-service-types

graphql331.3kMITdeprecated1.8.7TypeScript support: included

this package has been merged into graphql-language-service

Types for building GraphQL language services for IDEs

graphql

readme

Black Lives Matter 🖤

GraphQL IDE Monorepo

Security Notice: All versions of graphiql < 1.4.7 are vulnerable to an XSS attack in cases where the GraphQL server to which the GraphiQL web app connects is not trusted. Learn more in the graphiql security docs directory

Looking for the GraphiQL Docs?: This is the root of the monorepo! The full GraphiQL docs are located at packages/graphiql

Build Status Discord Code Coverage GitHub top language GitHub language count Snyk Vulnerabilities for GitHub Repo LGTM Grade LGTM Alerts CII Best Practices

Overview

GraphiQL is the reference implementation of this monorepo, GraphQL IDE, an official project under the GraphQL Foundation. The code uses the permissive MIT license.

Whether you want a simple GraphiQL IDE instance for your server, or a more advanced web or desktop GraphQL IDE experience for your framework or plugin, or you want to build an IDE extension or plugin, you've come to the right place!

The purpose of this monorepo is to give the GraphQL Community:

  • a to-specification official language service (see: API Docs)
  • a comprehensive LSP server and CLI service for use with IDEs
  • a codemirror mode
  • a monaco mode (in the works)
  • an example of how to use this ecosystem with GraphiQL.
  • examples of how to implement or extend GraphiQL.

Latest Stable Ecosystem

`graphiql@1.0.xand ecosystem are organized as below. Any further changes tographiql@1.0.xare made against1.0.0` branch

Diagram of the current Monorepo and third party ecosystem

Proposed Ecosystem

As we re-write for `graphiql@2.x` ecosystem, this monorepo will contain an sdk and plugins.

Diagram of the proposed Monorepo and third party ecosystem

GraphiQL

Breaking Changes & Improvements: several interfaces are being dropped for new ones are arriving for GraphiQL 1.0.0! Read more in this issue

NPM jsDelivr hits (npm) npm downloads Snyk Vulnerabilities for npm package npm bundle size (version) npm bundle size (version)

Screenshot of GraphiQL with Doc Explorer Open

/ˈɡrafək(ə)l/ A graphical interactive in-browser GraphQL IDE. Try the live demo. We also have a demo using our latest netlify build for the main branch.

The GraphiQL IDE, implemented in React, currently using GraphQL mode for CodeMirror & GraphQL Language Service.

Learn more about GraphiQL in packages/graphiql/README.md

How To Setup/Implement GraphiQL

Edit graphiql-example

The GraphiQL Readme explains some of the ways to implement GraphiQL, and we also have the examples directory as well!

Monaco GraphQL

NPM jsDelivr hits (npm) npm downloads Snyk Vulnerabilities for npm package

Provides monaco editor with a powerful, schema-driven graphql language mode.

See the webpack example for a plain javascript demo using github API

CodeMirror GraphQL

NPM jsDelivr hits (npm) npm downloads Snyk Vulnerabilities for npm package

Animated Codemirror GraphQL Completion Example

Provides CodeMirror with a parser mode for GraphQL along with a live linter and typeahead hinter powered by your GraphQL Schema

GraphQL Language Service

NPM npm downloads Snyk Vulnerabilities for npm package

Provides a command-line interface for running GraphQL Language Service Server for various IDEs.

GraphQL Language Service Server

NPM npm downloads Snyk Vulnerabilities for npm package

An almost fully LSP compliant server process backing the GraphQL Language Service.

GraphQL Language Service Interface

NPM jsDelivr hits (npm) npm downloads Snyk Vulnerabilities for npm package

Runtime agnostic Language Service used by GraphQL mode for CodeMirror and GraphQL Language Service Server

GraphQL Language Service Parser

NPM npm downloads Snyk Vulnerabilities for npm package

An online immutable parser for GraphQL, designed to be used as part of syntax-highlighting and code intelligence tools such as for the GraphQL Language Service and codemirror-graphql.

GraphQL Language Service Types

NPM npm downloads

Flow and Typescript type definitions for the GraphQL Language Service.

GraphQL Language Service Utilities

NPM npm downloads Snyk Vulnerabilities for npm package

Utilities to support the GraphQL Language Service.

Browser & Runtime Support

Many of these packages need to work in multiple environments.

By default, all typescript packages target es6.

graphql-language-service-server and graphql-language-service-cli are made for the node runtime, so they target es2017

codemirror-graphql and the graphiql browser bundle use the .browserslistrc, which targets modern browsers to keep bundle size small and keep the language services performant where async/await is used, and especially to avoid the requirement of rengenerator-runtime or special babel configuration.

.browserslistrc:

last 2 versions
Firefox ESR
not dead
not IE 11
not ios 10
maintained node versions

To be clear, we do not support Internet Explorer or older versions of evergreen browsers.

Development

To get setup for local development of this monorepo, refer to DEVELOPMENT.md

Contributing to this repo

This is an open source project, and we welcome contributions. Please see CONTRIBUTING.md for details on how to contribute.

This repository is managed by EasyCLA. Project participants must sign the free GraphQL Specification Membership agreement before making a contribution. You only need to do this one time, and it can be signed by individual contributors or their employers.

To initiate the signature process please open a PR against this repo. The EasyCLA bot will block the merge if we still need a membership agreement from you.

Please note that EasyCLA is configured to accept commits from certain GitHub bots. These are approved on an exception basis once we are confident that any content they create is either generated by the bot itself or written by someone who has already signed the CLA (e.g., a project maintainer).

Please note that EasyCLA is configured to accept commits from certain GitHub bots. These are approved on an exception basis once we are confident that any content they create is either unlikely to consist of copyrightable content or else was written by someone who has already signed the CLA (e.g., a project maintainer). The bots that have currently been approved as exceptions are:

  • github-actions (exclusively for the changesets Action)

You can find detailed information here. If you have issues, please email operations@graphql.org.

Maintainers

Maintainers of this repository regulary review PRs and issues and help advance the GraphiQL roadmap

Alumni

Originally this was three seperate repositories

  • @leebyron - original author of all libraries
  • @asiandrummer - original creator of GraphiQL
  • @wincent - early co-author and maintainer
  • @lostplan - maintained the language service ecosystem until about 2017
  • @IvanGoncharov - maintainer and transitional mentor to @acao and others

Active

Fielding Proposals!

The door is open for proposals for the new GraphiQL Plugin API, and other ideas on how to make the rest of the IDE ecosystem more performant, scaleable, interoperable and extensible. Feel free to open a PR to create a document in the /proposals/ directory. Eventually we hope to move these to a repo that serves this purpose.

Community

  • Discord Discord - Most discussion outside of github happens on the GraphQL Discord Server
  • Twitter - @GraphiQL and #GraphiQL
  • GitHub - Create feature requests, discussions issues and bugs above
  • Working Group - Yes, you're invited! Monthly planning/decision making meetings, and working sessions every two weeks on zoom! Learn more.

changelog

Archived For up to date changelogs that are automatically generated by changesets, see CHANGELOG.md files in respective workspaces. For example, the graphiql changelog is located at packages/graphiql/CHANGELOG.md, and the language server changelog is located at packages/graphql-language-service-server/CHANGELOG.md

GraphiQL 0.14.2 - 11 Aug, 2019

Fixes

  • Fix SSR & use of window when introducing new extraKeys capability (#942)

GraphiQL 0.14.0 - 11 Aug, 2019

Features

  • Add defaultVariableEditorOpen prop (#744) - @acao

Fixes

  • Fix formatting of subscription errors - #636, #722 - @benjie
  • preserve ctrl-f key for macOS - #759 - @pd4d10
  • Fix earlier 'Mode graphql failed to advance stream' on Linux by eating an exotic whitespace character - #735 closed by #932 - @benjie
  • Fix: check this.editor exists before this.editor.off in QueryEditor

Codemirror GraphQL - 0.9 - 11 Aug, 2019

Chores

  • BREAKING: Update to gls-interface and gls-parser ^2.1
  • BREAKING: Deprecate support for GraphQL 0.11 and below
  • BREAKING: introduce MIT license
  • BREAKING: Support GraphQL 14

GraphQL Language Service Server 2.1.0 - 11 Aug, 2019

Features

  • Replace babylon with @babel/parser (#879) @ganemone
  • Add support for gql template tags (#883) @ganemone @Neitsch

Chores

  • BREAKING: remove incompatible dependencies on graphql 0.11 and below
  • BREAKING: add peer support for graphql 14.x
  • BREAKING: change copyright to MIT
  • update formatting for monorepo eslint/prettier rules
  • update readme, badges

GraphQL Language Service Parser 2.1.0 - 11 Aug, 2019

Fixes

  • Fix 'mode graphql failed to advance stream' error from shift-alt-space, etc - #932 - @benjie

GraphQL Language Service Interface 2.1.0 - 11 Aug, 2019

Features

  • add __typename field suggestion against object type - (#903) @yoshiakis
  • Update sortText logic, so that field sort is schema driven rather than alphabetically sorted - (#884) @ganenome

Chores

  • BREAKING: add peer support for graphql 14.x
  • MINOR BREAKING: Use MIT license
  • add test case for language service hover - @divyenduz @AGS-

GraphQL Language Service 2.1.0

  • BREAKING: add peer support for graphql 14.x
  • BREAKING: remove incompatible dependencies on graphql 0.11 and below (b/c of gls-utils 2.x)

GraphQL Language Service Utils 2.1.0 - 11 Aug, 2019

Chores

  • BREAKING: change copyright to MIT
  • update formatting for monorepo eslint/prettier rules
  • update readme, badges

GraphQL Language Service Types 1.3.0 - 11 Aug, 2019

Chores

  • BREAKING: change copyright to MIT
  • BREAKING: add peer support for graphql 14.x
  • update formatting for monorepo eslint/prettier rules
  • update readme, badges

GraphiQL 0.13.2 - 21 June, 2019

Features

  • Hint/popup/etc DOM nodes use container rather than creating children of <body> - #791 - @codestryke
  • Add readOnly prop and pass to QueryEditor and VariableEditor - #718 - @TheSharpieOne
  • Add operationName to introspection query - #664 - @jbblanchet
  • Image Preview Functionality - #789 - @dunnbobcat @asiandrummer

Fixes

  • Destroy image hover tooltip when it isn't needed - #874 - @acao
  • Copy non-formatted query to avoid stripping out comments - #832 - @jaebradley
  • Normalizes no-break spaces - #781 - @zouxuoz
  • Prevents crashing on Shift-Alt-Space - #781 - @zouxuoz
  • Fix UI state change after favoriting a query - #747 - @benjie

Chores

  • BREAKING: Upgrade to codemirror-graphql 0.8.3 - #773 - @jonaskello
  • BREAKING: Change copyright to GraphQL Contributors, License to MIT
  • Netlify deployments per PR - @orta
  • Add unit test coverage
  • Switch to Jest

Codemirror Graphql Mode 0.8.4 - 11 Aug, 2018

You will now be importing async methods from gls-interface 2.0.0, thus your bundler will require regenerator runtime

Chores

  • BREAKING - Use GLS interface/parser 2.1.0 for graphql 14
  • BREAKING - This introduces async/await

GraphQL Language Service Interface 2.0.0 - 11 Sep, 2018

Chores

  • BREAKING: upgrade internal dependencies - gls-parser, gls-types, and gls-utils to 2.0.0 - @lostplan
  • BREAKING: remove incompatible dependencies on graphql 0.11 and below - @lostplan

GraphQL Language Service Utils 2.0.0 - 11 Sep, 2018

Chores

GraphQL Language Service Utils 1.2.2 - 11 Sep, 2018

Chores

  • add graphql-js 0.13 to peer deps of types package (graphql/graphql-language-service#241)

GraphQL Language Service Server 2.0.0 - 11 Sep, 2019

Chores

  • add graphql-js 0.13 to peer dependencies (graphql/graphql-language-service#241)
  • BREAKING: ugrade internal dependencies - gls-interface, gls-server and gls-utils to 2.0.0 @lostplan

GraphQL Language Service 2.0.0 - 11 Sep, 2018

Chores

  • BREAKING: ugrade internal dependencies - gls-interface, gls-server and gls-utils to 2.0.0 @Sol