@expo/codemirror-graphql
GraphQL mode and helpers for CodeMirror.
Last updated 3 years ago by skevy .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @expo/codemirror-graphql 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.6.11                                ...           latest (3 years ago)

1 Versions

  • 0.6.11                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |