apollographql / graphql-subscriptions

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

Support passing options to asyncIterableIterator #278

Open boehlkers opened 5 days ago

boehlkers commented 5 days ago

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, 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.