Skip to content

packages/graphql-pubsub/src

Classes

ClassDescription
GraphQLPubSubGlobalModule-
GraphQLPubSubModuleFeature module that provides a RedisPubSub instance for use with GraphQL subscriptions.
GraphQLPubSubModuleCore-
PubSubAsyncIteratorAsync iterator for GraphQL subscriptions backed by a PubSubEngine.
RedisPubSubRedis-backed implementation of the PubSubEngine contract.

Functions

FunctionDescription
InjectPubSubParameter decorator that injects the RedisPubSub instance registered under the GRAPHQL_PUBSUB token.

Interfaces

InterfaceDescription
AsyncIteratorOptionsOptions for RedisPubSub.asyncIterator / PubSubAsyncIterator.
GraphQLPubSubModuleOptionsOptions accepted by GraphQLPubSubModule.forRoot.
PubSubEngineCore PubSub contract that RedisPubSub implements.
RedisPubSubOptionsOptions for creating a RedisPubSub instance.
SubscriptionEventMetadata stored per active subscription.
SubscriptionOptionsOptions passed when subscribing to a trigger.

Type Aliases

Type AliasDescription
MessageHandlerCallback invoked whenever a message arrives on a subscribed trigger.
SubscriptionMapsubId → SubscriptionEvent map.
SubsRefsMapchannel → [subId, …] map for fan-out dispatch.
TriggerTransformA function that maps a trigger name (plus subscription options) to the Redis channel key that will actually be subscribed to.

Variables

VariableDescription
GRAPHQL_PUBSUBDI token for the RedisPubSub instance. Use InjectPubSub for convenience.
GRAPHQL_PUBSUB_OPTIONSDI token for the raw RedisPubSubOptions object.

Released under the MIT License.