-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multiple schemas and resolvers #184
Comments
Hey, thanks for the question. I'm not sure I completely understand what we are trying to achieve with allowing multiple schema strings... can you expand your question a bit? |
Hi @tonyghita. Sure. I'm currently using Go and this GraphQL library for multiple projects. Some of them share the same schemas and resolvers (user management for example). What I'm trying to achieve is to make the "user management" feature a plugin (or even a Go plugin) so I can simply import it and use its schema and resolvers whenever I need in my projects. This way, I avoid code duplication by allowing plugins / packages of GraphQL schemas and resolvers. The goal here would be for the library to merge strings of schemas (I got that part easily) but also merging root resolvers (I can't succeed for now). |
Are you looking for a kind of schema stitching functionality? Or is this different? |
Hey @mytototo, if I understand you correctly merging root resolvers could be done by type embedding. Eg. We have two resolvers, our
Now when we want to create a root resolver, we can embed these other two "plugin" resolvers.
And our Hopefully I've understood what you're after. |
Hi,
I'm writing Go / GraphQL applications and I'm looking to make everything a "module" / "plugin".
Is there any plan to allow slice of schemas and resolvers for
MustParseSchema
so we can import GraphQL "modules" and make them live on the same GraphQL mux?Thanks.
The text was updated successfully, but these errors were encountered: