Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pothos/packages/plugin-smart-subscriptions/mod.ts>SubscriptionManager

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Latest
class SubscriptionManager
implements AsyncIterator<object>
Re-export
import { SubscriptionManager } from "https://deno.land/x/pothos@release-1730496474/packages/plugin-smart-subscriptions/mod.ts";

Constructors

new
SubscriptionManager(unnamed 0: { value: object; debounceDelay?: number | null; subscribe: (name: string, cb: (err: unknown, data: unknown) => void) => Promise<void> | void; unsubscribe: (name: string) => Promise<void> | void; })

Properties

activeOptions: Map<string, RegisterOptions[]>
activeSubscriptions: Set<string>
debounceDelay: number | null
debounceRef: Timer | null
nextOptions: Map<string, RegisterOptions[]>
nextSubscriptions: Set<string>
pendingError: unknown
pendingEvent: boolean
pendingEvents: [string, unknown][]
rejectNext: ((err: unknown) => void) | null
resolveNext: ((done?: boolean) => void) | null
stopped: boolean
subscribeToName: (name: string, cb: (err: unknown, data: unknown) => void) => Promise<void> | void
unsubscribeFromName: (name: string) => Promise<void> | void
value: object

Methods

private
addOptions(name: string, options: RegisterOptions)
private
filterValue(name: string, value: unknown)
private
handleValue(name: string, value: unknown)
private
pushValue()
private
stop()
handleError(err: unknown)
next(): Promise<IteratorResult<object>>
register<T>(unnamed 0: RegisterOptions<T>)
throw(error: unknown)