grand-stack / grand-stack-starter

Simple starter project for GRANDstack full stack apps
https://grandstack.io/docs/getting-started-grand-stack-starter.html
Apache License 2.0
506 stars 161 forks source link

Modular/Plugin based graphql schema #6

Open peterclemenko opened 6 years ago

peterclemenko commented 6 years ago

The ability to use a modular or plugin based graphql schema would help greatly with using GraphQL in extensible applications using the GRAND stack.

johnymontana commented 6 years ago

Thanks for the suggestion @aoighost

What exactly did you have in mind? Something like graphql-import?

centinel3 commented 5 years ago

+1 for this.

If you have multiple schemas/type definitions in different files, each with their own seperate Query and Mutation types, using makeAugmentedSchema doesn't merge the Query and Mutation from the different files (as they are strings), so what happens is that the last Query and Mutation are exposed and none of the others. In order to use the @cipher and @relation directives, you need to use makeAugmentedSchema or augmentSchema. I may be missing something, but have tried various ways to make this work. Any help with this would be great as keeping the entire schema in one file isn't maintainable for large projects.