PubSub
Type Alias: PubSub
PubSub:
object
Defined in: src/graphql/pubsub.ts:8
Type of the publish and subscribe module used for publishing and subscribing to talawa events.
Type declaration
publish()
This method is used to publish an event.
Type Parameters
• TKey extends `chats.${string}:chat_messages::create`
Parameters
event
payload
PubSubPublishArgsByKey
[TKey
]
topic
TKey
callback?
() => void
Returns
void
subscribe()
This method is used to subscribe to events.
Type Parameters
• TKey extends `chats.${string}:chat_messages::create`
Parameters
topics
TKey
| TKey
[]
Returns
Promise
<Readable
& AsyncIterableIterator
<PubSubPublishArgsByKey
[TKey
]>>