-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
"createSubscriptionResolver" should be allowed to be overridden with a custom resolver as happens with "createResolver" function #1302
Comments
In v5 makeRemoteExecutableSchema is deprecated in favor of wrapSchema which acts like transformSchema++, you can specify remote schema options and transforms. Missing piece is to pass a function to provide your own delegating resolver, just requires an additional argument. That would work for queries, mutations, subscriptions. Folding into #1306 |
I'll be waiting for the custom delegating resolver parameter to come up then. Thank you. :) |
Moving to v5.1, reopening to move any relevant discussion here. |
= add support for custom subscription resolver generation to makeRemoteExecutableSchema = adds support for customizing resolver generation to schema config objects and thereby to wrapSchema/transformSchema, mergeSchemas = closes #1302
= add support for custom subscription resolver generation to makeRemoteExecutableSchema = adds support for customizing resolver generation to schema config objects and thereby to wrapSchema/transformSchema, mergeSchemas = closes #1302
finishes work in #1349 for #1302 = streamlines the CreateProxyingResolverFn signature as no further arguments expected, pass along all info to users for possible customization = adds fix for nested root query object to makeRemoteExecutableSchema = actually export defaultCreateProxyingResolver = reorders properties of SubschemaConfig, removes some unused properties
finishes work in #1349 for #1302 = streamlines the CreateProxyingResolverFn signature as no further arguments expected, pass along all info to users for possible customization = adds fix for nested root query object to makeRemoteExecutableSchema = actually export defaultCreateProxyingResolver = reorders properties of SubschemaConfig, removes some unused properties
Moved back into v5.0, track #1308 Thank you for pushing on this. |
That's realy great! Thank you!! |
I'm working on a project with a multi-tenant micro-services architecture. I have a Main_GraphQL server which imports schemas from other GraphQL services using
introspectSchema
andmakeRemoteExecutableSchema
.Let's assume that tenant1 wants to import schema from GraphQL_Service_1 and tenant2 from GraphQL_Service_2. The tricky thing is that both services have actually the same schema but the resolvers are different.
So what i need is when i get the call from tenant1 to run the resolvers from GraphQL_Service_1 and when i get a call from tenant2 to run the resolvers from GraphQL_Service_2.
I managed to achieve this for Query and Mutations by passing a
customCreateResolver
tomakeRemoteExecutableSchema
.The problem is that
makeRemoteExecutableSchema
doesn’t use thecustomCreateResolver
function when creating the resolvers for subscriptions but it uses the default one.Is it possible to allow overriding the subscription resolvers with a custom one as it happens now with the ones for Query and Mutation?
Thank you! I really need this.
The text was updated successfully, but these errors were encountered: