# graphql-cli-binding

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

Latest version **0.2.1** (published 2017-12-28) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install graphql-cli-binding
pnpm add graphql-cli-binding
yarn add graphql-cli-binding
bun add graphql-cli-binding
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2017-12-28 |
| First published | 2017-12-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Kim Brandwijk |
| Maintainers | kbrandwijk |
| Keywords | graphql-cli |

## Links

- npm: https://www.npmjs.com/package/graphql-cli-binding
- Repository: https://github.com/supergraphql/graphql-cli-binding
- Homepage: https://github.com/supergraphql/graphql-cli-binding#readme
- Issues: https://github.com/supergraphql/graphql-cli-binding/issues
- npm.io page: https://npm.io/package/graphql-cli-binding

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) 2.3.0
- [graphql-static-binding](https://npm.io/package/graphql-static-binding.md) 0.2.1

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2017-12-28
- 0.2.0 — 2017-12-23
- 0.1.4 — 2017-12-20
- 0.1.3 — 2017-12-20
- 0.1.2 — 2017-12-20
- 0.1.1 — 2017-12-20
- 0.1.0 — 2017-12-20

## README

# graphql-cli-binding ![npm](https://img.shields.io/npm/v/graphql-cli-binding.svg?style=for-the-badge)
![CircleCI](https://img.shields.io/travis/supergraphql/graphql-cli-binding.svg?style=for-the-badge)![David](https://img.shields.io/david/supergraphql/graphql-cli-binding.svg?style=for-the-badge)![Greenkeeper badge](https://img.shields.io/badge/Greenkeeper-enabled-brightgreen.svg?style=for-the-badge)  
Plugin for [`graphql-cli`](https://github.com/graphql-cli/graphql-cli). Generates static bindings for any GraphQL schema using [`graphql-static-binding`](https://github.com/supergraphql/graphql-static-binding) (WIP!) and outputs a code file.

## Installation

Install `graphql-cli-binding` either globally (recommended) or locally using your favorite package manager:
```shell
$ 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`.
<hr>
<p align="center">
  <img src="https://img.shields.io/badge/built-with_love-blue.svg?style=for-the-badge"/><a href="https://github.com/kbrandwijk" target="-_blank"><img src="https://img.shields.io/badge/by-kim_brandwijk-blue.svg?style=for-the-badge"/></a>
</p>

---
_Source: https://npm.io/package/graphql-cli-binding · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
