2017-11-15 17:43:53 -08:00
2017-11-15 17:43:53 -08:00
2017-08-23 19:44:50 -07:00
2017-11-15 17:43:53 -08:00
2017-11-15 17:43:53 -08:00
2015-08-31 19:30:12 -07:00
2017-11-15 17:43:53 -08:00
2017-11-15 17:43:53 -08:00
2017-11-15 17:43:53 -08:00
2017-11-15 17:43:53 -08:00
2015-08-31 19:30:12 -07:00
2017-11-15 17:43:53 -08:00
2017-11-15 17:43:53 -08:00
2015-08-31 19:30:12 -07:00
2016-02-02 23:31:48 -08:00

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.

S
Description
GraphQL mode and helpers for CodeMirror.
Readme BSD-3-Clause
1.6 MiB
0 Stars 1 Watchers 0 Forks
2026-11-13 20:10:22 -10:00
Languages
JavaScript 98.8%
Shell 1.2%