import { PubSubAsyncIterator } from "https://deno.land/x/oak_graphql@0.6.4/graphql-subscriptions/pubsub-async-iterator.ts";
A class for digesting PubSubEngine events via the new AsyncIterator interface. This implementation is a generic version of the AsyncIterator, so any PubSubEngine may be used.
Constructors
new
PubSubAsyncIterator(pubsub: PubSubEngine, eventNames: string | string[])Properties
private
pubsub: PubSubEngineprivate
pullQueue: ((value: IteratorResult<T>) => void)[]private
pushQueue: T[]Methods
private
emptyQueue()private
subscribeAll()private
unsubscribeAll(subscriptionIds: number[])throw(error: any)