@graphql-yoga/redis-event-target
Version:
Do distributed GraphQL subscriptions over Redis.
8 lines (7 loc) • 385 B
TypeScript
import type { TypedEventTarget } from '@graphql-yoga/typed-event-target';
import type { Redis, Cluster } from 'ioredis';
export declare type CreateRedisEventTargetArgs = {
publishClient: Redis | Cluster;
subscribeClient: Redis | Cluster;
};
export declare function createRedisEventTarget<TEvent extends CustomEvent>(args: CreateRedisEventTargetArgs): TypedEventTarget<TEvent>;