Skip to content
This repository has been archived by the owner on Jan 5, 2018. It is now read-only.

Generates a static binding file for any GraphQL schema and outputs a single code file

License

Notifications You must be signed in to change notification settings

supergraphql/graphql-cli-binding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-cli-binding npm

CircleCIDavidGreenkeeper badge
Plugin for graphql-cli. Generates static bindings for any GraphQL schema using graphql-static-binding (WIP!) and outputs a code file.

Installation

Install graphql-cli-binding either globally (recommended) or locally using your favorite package manager:

$ yarn [global] add graphql-cli-binding
$ npm install graphql-cli-binding [--global]

Usage

graphql bindings [schema]

Generate static bindings for the schema and output to a single code file

Options:
  --dotenv         Path to .env file                                    [string]
  -p, --project    Project name                                         [string]
  --schema         Schema file to process                               [string]
  --output, -o     Filename of output code file              [string] [required]
  --generator, -g  Generator used to generate binding files             [string]
  --force, -f      Force overwriting exissting output file             [boolean]
  -h, --help       Show help                                           [boolean]
  -v, --version    Show version number                                 [boolean]

Available generators

Currently, the following generators are available:

  • graphcool-ts: Generate Typescript binding file based on graphcool-binding
  • graphcool-js: Generate Javascript binding file based on graphcool-binding
  • binding-ts: Generate Typescript binding file based on graphql-binding
  • binding-js: Generate Javascript binding file based on graphql-binding

You can also pass your own generator file to --generator.


About

Generates a static binding file for any GraphQL schema and outputs a single code file

Resources

License

Stars

Watchers

Forks

Packages

No packages published