apollographql / graphql-subscriptions

:newspaper: A small module that implements GraphQL subscriptions for Node.js
MIT License
1.58k stars 133 forks source link

Need a way to return a response right after when there's a new subscription request. #235

Open rkdrnf opened 3 years ago

rkdrnf commented 3 years ago

I'm using the Subscription feature to track the progress of a task. But sometimes when the task is completed while a client is sending a request to subscribe progress, it can't receive any events from the server because on the server, the task is already completed and there would be no events anymore. Therefore, the client just stays on the incomplete state without knowing that the task is already completed.

If the server can send an immediate response to the client right after receiving a subscription request, it would be able to send a response that the task is already completed.

sepsol commented 6 months ago

@rkdrnf Were you able to finally find a workaround for this?