apollographql / apollographql/graphql-subscriptions

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

Open
#235 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
129
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start at the subscription request handling described in the issue and trace how completed tasks are represented. Confirm the intended immediate-response behavior with maintainers, then add coverage for a subscription request that arrives after completion and verify the client receives the completed state.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, node.js, typescript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.