apollographql / apollographql/graphql-subscriptions
Support passing options to asyncIterableIterator
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for the new 3.0.0 release! I'm trying to use 3.0.0 now instead of the asyncIterator implementation in [graphql-redis-subscriptions](https://github.com/davidyaha/graphql-redis-subscriptions/blob/master/src/pubsub-async-iterator.ts), in implementing redis subscriptions; however, the pubsubAsyncIterator class implemented here does not have an ability to pass options through from the constructor through to the underlying `pubsub.subscribe` call.
Could we add a third argument to the constructor of `PubSubAsyncIterableIterator` (and the associated `asyncIterableIterator` function in `PubSubEngine`) which passes `options` through to the underlying `subscribe` call? This would mirror the capabilities provided by `subscribe`.
Contributor guide
Research direction
Start at the PubSubAsyncIterableIterator constructor and the asyncIterableIterator function in PubSubEngine, then trace how the underlying pubsub.subscribe call is made. Confirm how subscribe currently receives options and verify that the iterator entry points pass the requested options through consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100