Package Exports
- bind
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bind) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Install
yarn add bind
Setup
Create a .bindrc
or bind.config.js
that exports the following options
graphql.schema: string
Relative path or URL to GraphQL schema (default: "./schema.graphql")
graphql.output: string
Relative path of output schema declaration file (default: "./schema.d.ts")
graphql.files: string
Glob for GraphQL files to compile (default: "**/*.graphql")
graphql.print: boolean
Do not write schema file, and instead print the result (default: false)
Use
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.
Generated code
TODO?