If I set installSubscriptionHandlers true with apollo-server-fastify
_TypeError: this._apolloServer.installSubscriptionHandlers is not a function_ error were occurred
GraphQLModule.forRootAsync({
useFactory: async (configService: ConfigService) => {
const graphqlConfig = configService.get<GraphqlConfig>('graphql');
return {
installSubscriptionHandlers: true,
buildSchemaOptions: {
numberScalarMode: 'integer',
},
sortSchema: graphqlConfig!.sortSchema,
autoSchemaFile: graphqlConfig!.schemaDestination,
debug: graphqlConfig!.debug,
playground: graphqlConfig!.playgroundEnabled,
plugins: [apolloServerSentryPlugin],
context: ({ req }) => ({ req }),
};
},
inject: [ConfigService],
}),
"@nestjs/common": "^8.0.5",
"@nestjs/config": "^1.0.1",
"@nestjs/core": "^8.0.5",
"@nestjs/graphql": "^8.0.2",
"@nestjs/jwt": "^8.0.0",
"@nestjs/passport": "^8.0.0",
"@nestjs/platform-fastify": "^8.0.5",
"apollo-server-fastify": "^3.0.2",
NestJS v8 isn't compatible with Apollo v3. Apollo v3 removed built-in subscriptions support. We're tracking this here https://github.com/nestjs/graphql/pull/1638
For the time being, you should, for example, use the [email protected] version
Most helpful comment
NestJS v8 isn't compatible with Apollo v3. Apollo v3 removed built-in subscriptions support. We're tracking this here https://github.com/nestjs/graphql/pull/1638
For the time being, you should, for example, use the
[email protected]version