update websocket

This commit is contained in:
2024-11-06 17:16:10 +07:00
parent ef5c753ce4
commit 57037a59ec
18 changed files with 129 additions and 71 deletions

View File

@@ -41,6 +41,7 @@ import { WorkshopSubscriptionModule } from '../WorkshopSubscription/workshopsubs
import { initContextCache } from '@pothos/core'
import { PubSub } from 'graphql-subscriptions'
import { isSubscription } from 'rxjs/internal/Subscription'
import { EventEmitter } from 'ws'
@Global()
@Module({
@@ -147,7 +148,10 @@ import { isSubscription } from 'rxjs/internal/Subscription'
},
{
provide: 'PUB_SUB',
useFactory: () => new PubSub(),
useFactory: () =>
new PubSub({
eventEmitter: new EventEmitter({}),
}),
},
],
exports: [