@ftw/graphql-codegen

0.0.11 • Public • Published

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

/@ftw/graphql-codegen/

    Package Sidebar

    Install

    npm i @ftw/graphql-codegen

    Weekly Downloads

    6

    Version

    0.0.11

    License

    MIT

    Unpacked Size

    27.7 kB

    Total Files

    24

    Last publish

    Collaborators

    • anthonymattox
    • danmartens
    • joshhepworth