$ npm install bind
yarn add bind
Create a .bindrc
or bind.config.js
that exports the following options
Relative path or URL to GraphQL schema (default: "./schema.graphql")
Relative path of output schema declaration file (default: "./schema.d.ts")
Glob for GraphQL files to compile (default: "**/*.graphql")
Do not write schema file, and instead print the result (default: false)
Use bind/graphql-webpack-loader
as your Webpack loader for GraphQL files.
Use bind/graphql-jest-transform
as your Jest transform for GraphQL files.
Run yarn bind:graphql
to create type definitions for all GraphQL files.
Import .graphql
files directly into your TypeScript file.
TODO?
© 2010 - cnpmjs.org x YWFE | Home | YWFE