The NestJS team shipped version 12.6.0 on November 20. The handiest change is small: NestFactory.create() now works out the application type from the adapter, so one of the usual generics in main.ts can go. It also adds graceful WebSocket shutdown and a few behaviour changes to read before upgrading.
What is new in NestJS 12.6.0
Until now, using Fastify with correct editor hints meant writing this in main.ts: NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter()). According to the 12.6.0 release notes, the type argument is no longer needed. A call with new FastifyAdapter() returns a NestFastifyApplication, and the same works for ExpressAdapter and NodeAdapter. The old form with an explicit type still compiles. A custom adapter declares its application type as the fourth type argument of AbstractHttpAdapter (PR #18623).
The second addition is about WebSockets. WsAdapter now takes a gracefulShutdown option (off by default) and a gracePeriod (10,000 ms by default). With them on, an application that is closing stops accepting connections, ignores new messages, waits up to gracePeriod for handlers that are still running, and closes every socket with code 1001. During deploys, clients get a clear "going away" signal instead of a dropped connection (PR #18589).
The gRPC server got a similar limit, and this is the first change that can catch people out. Before, with gracefulShutdown it waited for running calls with no limit. From 12.6.0, calls that have not finished within gracePeriod are cancelled. If you run long streams, raise that limit (PR #18566).
Behaviour changes to check
- A custom parameter decorator that hands the response object to your handler now behaves like
@Res(): the object reaches the method as it is and no pipe runs on it. On Fastify such a handler used to never run at all. - In tests,
createNestApplication()treats theloggerandforceConsoleoptions the same wayNestFactorydoes.logger: truekeeps logging on, where it used to switch it off. - The Fastify router answers with a 400 (
FST_ERR_BAD_URL) when a request target does not start with/. This comes from the update offind-my-wayto 9.10.2. - Microservice clients (Kafka, MQTT, Redis, RabbitMQ) now fail pending requests with "Connection closed" when the connection goes away, instead of leaving them hanging.
The dependency list also includes ws 8.23.0 and light-my-request 6.8.1. Beyond the new features, the release brings 30 bug fixes across common, core, microservices, testing and the HTTP adapters, from 20 contributors. My take: this is an upgrade worth doing right away, but read the behaviour changes section first, especially if you use gRPC or test your logging.
What this means if you are learning to code
If you are just getting to know NestJS, keep one thing from this release: the framework keeps getting better at using TypeScript so you type fewer types by hand. Inferring a type from an argument is the same mechanism you use every day in ordinary generic functions. Understand it before writing your own decorators and adapters. The basics are in the TypeScript documentation and the TypeScript collection.
Graceful shutdown sounds advanced, but the idea is worth learning now. Every app you deploy will be restarted at some point, and users should not lose data when that happens. When you get to WebSockets, check what your app does when it closes.
We go through controllers, services, modules and WebSockets step by step in the NestJS course. If you are wondering whether to move from Express to Fastify, have a look at the Fastify collection. To start with, the default Express is fine: the speed gap matters only under heavy traffic.
Also today
- Codex 0.171.0 with GPT-6.2 models. The new version of OpenAI's tool adds GPT-6.2 Sol and Astra to the model catalog, with Sol as the default pick. The terminal workspace view is now on by default, with previews of documents, images and subagent transcripts, and
codex exec --remotestarts a session on an existing app server. Source - Claude Code 2.1.330 with stability fixes. The release fixes a freeze of up to several minutes after compacting a very long conversation, and a bug where
ExitWorktreedeleted a worktree that another session was using. Settings are no longer lost when several processes save them at once. Source - Vue 3.5.46 with transition and SSR fixes. Bug fixes only: the
Transitioncomponent ignores stale callbacks on a reused element, and CSS variables now reach loops, fragments,KeepAliveandTeleportcontent during server rendering. Source - Vercel Functions accept request bodies up to 20 MiB. The request body limit goes from 4.5 MB to 20 MiB in public beta. You need to set
VERCEL_SUPPORT_LARGE_REQUEST_BODY=1and 4 GB of function memory, and the Edge runtime keeps the old limit. Source - FFmpeg 9.1 "Gauss". The new stable release of the audio and video library came out on November 20; the 9.1 branch was cut on October 24. Source
Frequently asked questions
Do I have to change main.ts after upgrading to NestJS 12.6?
No. The form with an explicit type, for example NestFactory.create<NestFastifyApplication>(...), still works. You can remove it, since the type is now inferred from the adapter, but you do not have to.
What does gracefulShutdown do in WsAdapter?
When the application closes, the server stops accepting new connections and messages, waits up to gracePeriod (10 seconds by default) for running handlers, and closes the sockets with code 1001. The option is off by default.
Can NestJS 12.6 break an existing project?
It can if you run a gRPC server with long streams, because calls are now cancelled after gracePeriod. It is also worth checking tests that pass logger: true and custom decorators that return the response object.
Sources
- NestJS v12.6.0 release notes, NestJS, 2026-11-20
- Codex rust-v0.171.0, OpenAI, 2026-11-20
- Claude Code v2.1.330, Anthropic, 2026-11-20
- Vue v3.5.46, Vue.js, 2026-11-20
- Vercel Functions now support request bodies up to 20MiB, Vercel, 2026-11-20
- FFmpeg 9.1 "Gauss", FFmpeg, 2026-11-20
This article was prepared with the help of AI from primary sources and reviewed by the CodeWorlds editorial team.