thang an pha qua
This commit is contained in:
@@ -40,8 +40,6 @@ import { WorkshopOrganizationModule } from '../WorkshopOrganization/workshoporga
|
||||
import { WorkshopSubscriptionModule } from '../WorkshopSubscription/workshopsubscription.module'
|
||||
import { initContextCache } from '@pothos/core'
|
||||
import { PubSub } from 'graphql-subscriptions'
|
||||
import { isSubscription } from 'rxjs/internal/Subscription'
|
||||
import { EventEmitter } from 'ws'
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
@@ -90,7 +88,6 @@ import { EventEmitter } from 'ws'
|
||||
debug: process.env.NODE_ENV === 'development' || false,
|
||||
playground: process.env.NODE_ENV === 'development' || false,
|
||||
introspection: process.env.NODE_ENV === 'development' || false,
|
||||
installSubscriptionHandlers: true,
|
||||
subscriptions: {
|
||||
'graphql-ws': true,
|
||||
},
|
||||
@@ -100,6 +97,7 @@ import { EventEmitter } from 'ws'
|
||||
extra,
|
||||
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
||||
}: { req?: Request; subscriptions?: any; extra?: any }) => {
|
||||
initContextCache()
|
||||
if (subscriptions) {
|
||||
return {
|
||||
isSubscription: true,
|
||||
@@ -148,10 +146,7 @@ import { EventEmitter } from 'ws'
|
||||
},
|
||||
{
|
||||
provide: 'PUB_SUB',
|
||||
useFactory: () =>
|
||||
new PubSub({
|
||||
eventEmitter: new EventEmitter({}),
|
||||
}),
|
||||
useFactory: () => new PubSub(),
|
||||
},
|
||||
],
|
||||
exports: [
|
||||
|
||||
Reference in New Issue
Block a user