Skip to content
GraphQL mode and helpers for CodeMirror.
Branch: master
Clone or download
Latest commit 8eb0993 Oct 29, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources Support graphql 0.11 (#235) Nov 20, 2017
src run yarn pretty Aug 24, 2017
.babelrc upgraded to babel 6 and made chagnes to plugin structure Oct 12, 2016
.gitignore Include results/ in npm builds Aug 28, 2016
package.json 0.8.3 Oct 29, 2018

GraphQL mode for CodeMirror

Build Status

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

Getting Started

npm install --save codemirror-graphql

CodeMirror helpers install themselves to the global CodeMirror when they are imported.

import CodeMirror from 'codemirror';
import 'codemirror/addon/hint/show-hint';
import 'codemirror/addon/lint/lint';
import 'codemirror-graphql/hint';
import 'codemirror-graphql/lint';
import 'codemirror-graphql/mode';

CodeMirror.fromTextArea(myTextarea, {
  mode: 'graphql',
  lint: {
    schema: myGraphQLSchema
  hintOptions: {
    schema: myGraphQLSchema

Build for the web with webpack or browserify.

You can’t perform that action at this time.