Skip to content

Interface: RedisPubSubOptions

Defined in: packages/graphql-pubsub/src/interfaces.ts:4

Options for creating a RedisPubSub instance.

Properties

PropertyTypeDescriptionDefined in
connection?RedisOptionsioredis connection options used when publisher/subscriber are not provided.packages/graphql-pubsub/src/interfaces.ts:15
connectionListener?(err) => voidCalled when the publisher/subscriber connections are established or fail. undefined is passed on successful connect, an Error on failure.packages/graphql-pubsub/src/interfaces.ts:20
deserializer?(payload) => unknownCustom deserializer for incoming message payloads. Defaults to JSON.parse.packages/graphql-pubsub/src/interfaces.ts:32
keyPrefix?stringKey prefix prepended to every Redis channel name.packages/graphql-pubsub/src/interfaces.ts:6
publisher?RedisPre-existing Redis client used for publishing.packages/graphql-pubsub/src/interfaces.ts:8
reviver?(key, value) => unknownOptional JSON reviver function passed to JSON.parse when deserialising incoming messages (used only when deserializer is not provided).packages/graphql-pubsub/src/interfaces.ts:28
serializer?(payload) => stringCustom serializer for outgoing message payloads. Defaults to JSON.stringify.packages/graphql-pubsub/src/interfaces.ts:30
subscriber?RedisPre-existing Redis client used for subscribing.packages/graphql-pubsub/src/interfaces.ts:10
triggerTransform?TriggerTransformTransforms a trigger name before it is used as the Redis channel key.packages/graphql-pubsub/src/interfaces.ts:22

Released under the MIT License.