joarwilk / gql2flow

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

How to use these annotations #2

Closed limpbrains closed 7 years ago

limpbrains commented 7 years ago

Hi, @joarwilk Thanks for this lib!

I have a question. How do you use file generated by this script ? Do you add it somewhere to .flowconfig so types would be global ? I'm thinking to add export before every type keyword, so I could import them anywhere. May be this should be default behaviour?

joarwilk commented 7 years ago

Ah yes, I should probably add a usage section regarding that.

If you add the file under [libs] in your .flowconfig the types will be available throughout your application.

I like my GQL types global but if there's a need for explicitly importing them instead maybe support for that should be added.

limpbrains commented 7 years ago

Thanks for answer. I prefer not to use globals and have explicit import. Please add export statesments. If you want, I can prepare PR after #1 will be fixed.