
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
sort-graphql-schema
Advanced tools
Sort JSON GraphQL schemas for commit consistency. Useful when using Relay with non-deterministically auto-generated schemas.
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
API:
const fs = require('fs')
const { graphql } = require('graphql');
const { introspectionQuery } = require('graphql/utilities');
const sortSchema = require('sort-graphql-schema');
const schema = require('./path/to/schema');
graphql(schema, introspectionQuery)
.then(result => {
fs.writeFileSync('/path/to/output.json', JSON.stringify(sortSchema(result), null, 2));
console.log('Done!');
});
CLI:
sort-graphql-schema schema.json
Yes, thank you. Please lint, update/write tests and add your name to the package.json file before you PR.
MIT
FAQs
Sort JSON GraphQL schemas for commit consistency
The npm package sort-graphql-schema receives a total of 1,075 weekly downloads. As such, sort-graphql-schema popularity was classified as popular.
We found that sort-graphql-schema demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.