0.0.11 • Published 7 years ago

@ftw/graphql-codegen v0.0.11

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

GraphQL Codegen

Installation

$ yarn add --dev @ftw/graphql-codegen

Getting Started

Make sure your GraphQL server is running and then run the following in the root of your project (where http://localhost:3000/graphql is your GraphQL endpoint):

$ yarn run graphql-codegen http://localhost:3000/graphql

Using With GatsbyJS

Because GatsbyJS doesn't allow any JS files which don't export React components in the "src/pages" directory, GraphQL Codegen allows outputting type definitions to a single directory with the --flat option:

$ yarn run graphql-codegen --flat -o src/__generated__ http://localhost:8000/___graphql