Skip to content

Interface: AsyncIteratorOptions ​

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

Options for RedisPubSub.asyncIterator / PubSubAsyncIterator.

Extends SubscriptionOptions with iterator-level defensive knobs that are not propagated to the pubsub engine itself.

Extends ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
idleTimeoutMs?numberWhen set to a positive number, the iterator auto-returns (unsubscribing and releasing its entry from the pubsub's subscriptionMap) if no message is received for this many milliseconds. Defensive guardrail for edge cases where the WebSocket handler fails to call iter.return() on client disconnect. Disabled by default so existing semantics are preserved. Typical value: 5 * 60 * 1000 (5 minutes) for long-lived but not truly eternal subscriptions.-packages/graphql-pubsub/src/interfaces.ts:69
pattern?booleanWhen true, use Redis pattern-subscribe (PSUBSCRIBE) instead of SUBSCRIBE.SubscriptionOptions.patternpackages/graphql-pubsub/src/interfaces.ts:47

Released under the MIT License.