apollographql / apollographql/graphql-subscriptions

Fire Multiple Publishing

Open
#195 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
129
PR merge metrics
No merged PRs in 30d

Description

- [ ] has-reproduction
- [X] feature
- [ ] blocking
- [ ] good first issue

Hi,

Is it possible to fire multiple events at the same time by ```pubsub.publish```

For example,
```
ctx.pubsub.publish(["event_1","event_2","event_3"], { TaskAdded: updatedTask });
```
It likes that ```pubsub.asyncIterator(["event_1","event_2"])``` which accepts array as params.

Contributor guide

Open the contributing guide

Research direction

Start by reading the pubsub.publish API and comparing its current argument handling with pubsub.asyncIterator, which already accepts an array. Determine the intended behavior for publishing to event_1, event_2, and event_3 from one call, then confirm that the documented example works without changing existing single-event behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.