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

x/oak_graphql/graphql-subscriptions/pubsub.ts>PubSub

A simple graphql middleware for oak deno framework.
Latest
class PubSub
extends PubSubEngine
import { PubSub } from "https://deno.land/x/oak_graphql@0.6.4/graphql-subscriptions/pubsub.ts";

Constructors

new
PubSub(options?: PubSubOptions)

Properties

private
subIdCounter: number
private
subscriptions: { [key: string]: [string, (...args: any[]) => void]; }
protected
ee: EventEmitter

Methods

publish(triggerName: string, payload: any): Promise<void>
subscribe(triggerName: string, onMessage: (...args: any[]) => void): Promise<number>
unsubscribe(subId: number)