Graphql federation & closing subscription on the subgraph #609
Unanswered
pdambrauskas
asked this question in
Q&A
Replies: 1 comment 6 replies
-
|
Not only are the Lines 862 to 867 in 102e634 Meaning, even if we left the I'd instead focus on fixing this:
The |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
We are using graphql-ws with Graphql Federation.
It works as follows:
useServer/makeServergraphql-ws utility functions in combination with graphql-yoga) delegates subscription to one of the subgraphs by using single Websocket client.It seems that when the client closes the connection, subscription federation gateway does not send
CompleteMessageto our subgraph. This means, that our Redis Pub/Sub stream stays active and we eventually get to resource exhaustion.I had an idea to hook up some logic on
onClosecallback & sendCompleteMessageto ur subgraph from there, but it seems thatgraphql-wsremoves subscriptions form the context:graphql-ws/src/server.ts
Line 860 in 102e634
Are there any other ways/suggestions how to address this issue?
@enisdenjo
Beta Was this translation helpful? Give feedback.
All reactions