graphql/codemirror-graphql

Name: codemirror-graphql

Owner: Facebook GraphQL

Description: GraphQL mode and helpers for CodeMirror.

Created: 2015-09-01 01:16:57.0

Updated: 2018-01-12 14:26:24.0

Pushed: 2018-01-05 14:14:29.0

Homepage: null

Size: 1479

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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
install --save codemirror-graphql

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

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

Mirror.fromTextArea(myTextarea, {
de: 'graphql',
nt: {
schema: myGraphQLSchema

ntOptions: {
schema: myGraphQLSchema


Build for the web with webpack or browserify.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.