How can we handle separate files for resolvers and...
# orm-help
a
How can we handle separate files for resolvers and schema? I would like to have one file per concern. Eg User.graphql and UserResolver.js Then Comment.graphql and CommentResolver.js
k
Just import all the individual schema.graphql types on the top of the main schema.graphql
a
Sorry I was unclear, Im talking about graphql-yoga and not prisma. Does that work there? Package? Can mutations also reside in the import?
k
No idea
I would love to separate the mutations on line 12-13 and 16-17 to their respective files, but I'm not sure if it's possible
a
I’m going to try this one out. Seems all that we want.... https://www.npmjs.com/package/merge-graphql-schemas Any thoughts?
l
I'm using and it works well. Just lookout for this gotcha https://github.com/okgrow/merge-graphql-schemas/issues/153