The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild

Products

Hive logoHive blurred logo

Hive

Schema Registry for your GraphQL Workflows

Skip to main content

Interface: MeshPubSub

types/src.MeshPubSub

Table of contents#

Methods#

Methods#

asyncIterator#

asyncIterator<THook\>(triggers): AsyncIterator<AllHooks[THook], any, undefined\>

Type parameters#

NameType
THookTHook: string

Parameters#

NameType
triggersTHook

Returns#

AsyncIterator<AllHooks[THook], any, undefined\>

Defined in#

packages/types/src/index.ts:78


publish#

publish<THook\>(triggerName, payload): Promise<void\>

Type parameters#

NameType
THookTHook: string

Parameters#

NameType
triggerNameTHook
payloadAllHooks[THook]

Returns#

Promise<void\>

Defined in#

packages/types/src/index.ts:71


subscribe#

subscribe<THook\>(triggerName, onMessage, options?): Promise<number\>

Type parameters#

NameType
THookTHook: string

Parameters#

NameType
triggerNameTHook
onMessage(data: AllHooks[THook]) => void
options?any

Returns#

Promise<number\>

Defined in#

packages/types/src/index.ts:72


unsubscribe#

unsubscribe(subId): void

Parameters#

NameType
subIdnumber

Returns#

void

Defined in#

packages/types/src/index.ts:77