/graphql-readable

Parse the JSON of full schema introspection to the readable type system.

Primary LanguageJavaScriptMIT LicenseMIT

graphql-readable

Code Climate Coverage Status npm package NPM downloads semantic-release

Parse the JSON of full schema introspection to the readable type system.

How to use

npm install graphql-readable --save-dev
// generator.js
var fs = require('fs')
var path = require('path')
var parser = require('graphql-readable')
var schema = require('./schema.json')

fs.writeFileSync(
  path.join(__dirname, './schemaType.graphql'),
  parser(schema, 'GraphQL')
)

fs.writeFileSync(
  path.join(__dirname, './schemaType.json'),
  parser(schema, 'JSON')
)
node ./generator.js