joarwilk / gql2flow

Convert a GraphQL Schema to a flow definition
97 stars 24 forks source link

Provide a non global npm package as well #16

Open sibelius opened 7 years ago

sibelius commented 7 years ago

I would like to add gql2flow step on this updateSchema script, so when I generate a new schema.json I would also generate a new .flow file

https://github.com/entria/graphql-dataloader-boilerplate/blob/master/scripts/updateSchema.js

I woud like to do something like this:

import gql2flow from 'gql2flow`

gql2flow(`path/to/schema.json`, `output/path`);
joarwilk commented 7 years ago

I added the fetch feature in the latest version, but I'll keep this issue open because providing a regular export is a sound idea. Will do when I have the time.