AsyncIterator
requires pulling data using .next()
. But with websockets I generally want to push data when events occur. Only thing I can think of is that by using pull-based they can rate-limit.
So what is calling .next()
? Is it a timer, or does it listen to a publish message, queue that, then call .next()
until it consumes all the queue?
Is this suitable for real-time data, like GPS positions on a map?
Looked here and still could not figure it out: https://github.com/facebook/graphql/blob/master/rfcs/Subscriptions.md
GraphQL Subscriptions repo from Apollo: https://github.com/apollographql/graphql-subscriptions