Closed michaelstaib closed 2 years ago
Hey guys. I'm interested in this feature, particularly the "simple root-field stitching".
Is this being worked on? is there anything I can do to help? Thank you. Leo.
Hey, I can't really wait for HC13. Is there a workaround for this? I need to stitch a few servers together, but I also need working subscriptions.
We currently create the subscriptions on the stitching server. Using redis, the source service can still use the topic sender to send to the subscription.
Thank you for the quick answer! Can you expand on this? Because creating the subscription on the stitching server would mean for us that the stitching server needs knowledge of the datastructures etc. instead of being just a dumbed down gateway.
This is now implemented.
services
.AddSingleton(httpClientFactory)
.AddSingleton(socketClientFactory)
.AddGraphQL()
.AddRemoteSchema(Context.ContractSchema)
.AddRemoteSchema(Context.CustomerSchema,
capabilities: new EndpointCapabilities
{
Batching = BatchingSupport.RequestBatching,
Subscriptions = SubscriptionSupport.WebSocket
})
.ModifyRequestOptions(o => o.IncludeExceptionDetails = true)
.BuildRequestExecutorAsync();
Hi @michaelstaib. I've recently started using hotchocolate for our microservice-based architecture. We have several backend services with one GraphQL gateway using the RemoteRedisSchemas for its schema federation. The mutations and queries are working like a charm but I am stuck on getting the subscriptions to work with the remote schemas.
Nevertheless, I have done some digging online which led me to this post. Is it at all possible to implement federated subscriptions now? If yes can you perhaps point me towards documentation or an example of how I can achieve this.
Above is an example of how we would like to use the schema federation.
We want to enable support for stitching subscriptions.
Basics
First we should be able to add the subscription fields of the remote schemas and basically do a simple root-field stitching. Basically what we described with the auto-stitching issue #561.
Query Merging
Furthermore we want to enable merging of query parts into the subscription response. So, basically a subscription result from schema a will be enhanced by querying schema b and integrating those results in the subscription response.