aerogear / create-graphql

Command-line utility to build production-ready servers with GraphQL.
MIT License
440 stars 38 forks source link

`GraphQLNonNull` & `GraphQLID` not being imported on Mutation generator #22

Closed lucasbento closed 7 years ago

lucasbento commented 7 years ago

We need to improve this: https://github.com/lucasbento/create-graphql/blob/master/packages/generator/src/mutation/index.js#L32-L51

sibelius commented 7 years ago

Can't we generate all that needs to be imported automatically?

lucasbento commented 7 years ago

@sibelius: no because some mutations might not need those types to be imported.

E.g. mutations without any required fields.

sibelius commented 7 years ago

that's why I said automatically

automatically -> detect which types are being used and then import them

lucasbento commented 7 years ago

That's what this is supposed to do but doesn't seem to be doing its job so well.

sibelius commented 7 years ago

add a test case