davidyaha / graphql-redis-subscriptions

A graphql subscriptions implementation using redis and apollo's graphql-subscriptions
MIT License
1.11k stars 125 forks source link

Lazy subscription is not expected behavior #632

Open masad-frost opened 3 weeks ago

masad-frost commented 3 weeks ago

When calling asyncIterator it doesn't immediately subscribe to redis topics, it waits until the iteration starts (next is called) to subscribe. This is unexpected behavior (checked with a few engineers). To avoid breaking changes, would you be open to adding an option that makes the subscription start (and buffer values to the queue) as soon as the iterator is created?