Sort GraphQL Schema
Sort JSON GraphQL schemas for commit consistency. Useful when using Relay with non-deterministically auto-generated schemas.
Installation
Runs on Node v6 or higher.
npm install sort-graphql-schema --save-dev
or install globally for CLI usage:
npm install -g sort-graphql-schema
Usage
API:
const fs = const graphql = ;const introspectionQuery = ;const sortSchema = ;const schema = ; ;
CLI:
sort-graphql-schema schema.json
Contributing
Yes, thank you. Please lint, update/write tests and add your name to the package.json file before you PR.
License
MIT