Graphql federation & closing subscription on the subgraph #609
Unanswered
pdambrauskas
asked this question in
Q&A
Replies: 1 comment 1 reply
-
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.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using graphql-ws with Graphql Federation.
It works as follows:
useServer
/makeServer
graphql-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
CompleteMessage
to 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
onClose
callback & sendCompleteMessage
to ur subgraph from there, but it seems thatgraphql-ws
removes 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