7.2.x requires fastify 2.x.
7.4.x requires fastify 3.x.
Using 7.4x is breaking projects with fastify 2.x dependencies
const serverOptions: fastify.ServerOptionsAsHttp = {
logger: ['log', 'error', 'warn'],
};
throws error: Namespace '"
const instance: fastify.FastifyInstance = fastify(serverOptions);
throws error: This expression is not callable.
Type 'typeof import("
import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify';
import * as fastify from '../node_modules/fastify';
let fastifyServer: fastify.FastifyInstance;
async function bootstrap(): Promise<fastify.FastifyInstance> {
const serverOptions: fastify.ServerOptionsAsHttp = {
logger: ['log', 'error', 'warn'],
};
const instance: fastify.FastifyInstance = fastify(serverOptions);
const nestApp = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter(instance),
{
logger: ['log', 'error', 'warn'],
},
);
Minor increments are non-breaking
7.4 should be 8.x
Nest version: 6.14.1
For Tooling issues:
- Node version: 12.13.0
- Platform: Mac
Others:
Using npm and VSCode
same here, is breaking the Exception filters.
It is also a breaking change for projects using GraphQL with Fastify, as apollo-server-fastify does not support Fastify 3.x for now.
I have the same problem with GraphQL using Fastify with apollo-server-fastify.
I have the same problem with GraphQL using Fastify with apollo-server-fastify
@robinsmedberg Check it out. I'm waiting too for the update from apollo-server-fastify for upgrade to Fastify v3. This is in alpha now.
https://github.com/nestjs/nest/issues/5055#issuecomment-696982213
works fine in "@nestjs/common": "^7.5.2" , "@nestjs/platform-fastify": "^7.5.2",
Also works fine for GraphQL with the following versions
"@nestjs/common": "^7.5.5",
"@nestjs/core": "^7.5.5",
"@nestjs/graphql": "^7.8.2",
"@nestjs/platform-fastify": "^7.5.5",
"apollo-server-fastify": "^2.19.0"
Though the GraphQL playground is not working with [email protected]. The next alpha release is required ([email protected]), see https://github.com/apollographql/apollo-server/issues/4463
Most helpful comment
It is also a breaking change for projects using GraphQL with Fastify, as
apollo-server-fastifydoes not support Fastify 3.x for now.