@gr2m/github-graphql-schema

GitHub’s GraphQL Schema with validation. Automatically updated.

Stats

StarsIssuesVersionUpdatedCreatedSize
@gr2m/github-graphql-schema
12222.11.04 years ago4 years agoMinified + gzip package size for @gr2m/github-graphql-schema in KB

Readme

github-graphql-schema

GitHub’s GraphQL Schema with validation. Automatically updated.

Build Status Greenkeeper badge

Usage

const {validate} = require('@gr2m/github-graphql-schema')
const errors = validate(`
{
  viewer {
    login
  }
}
`)

// errors is array. Contains errors if any

You can also load the current Schema directly as JSON or IDL.

const {schema} = require('@gr2m/github-graphql-schema')
schem.json // JSON version
schem.idl // IDL version

Local setup

git clone https://github.com/gr2m/github-graphql-schema.git
cd github-graphql-schema
npm install
npm test

Update schema files (GH_TOKEN requires no scope)

GH_TOKEN=... bin/download.js

Create pull request (after schema files changed). This script is run daily on Travis CI. The token requires public_repo scope.

GH_TOKEN=... TRAVIS_REPO_SLUG=gr2m/github-graphql-schema bin/create-pull-request.js

LICENSE

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.