# What changed in @fastify/websocket

> 6 changes in @fastify/websocket 9 to 11 from its official release notes, upgrade guides and advisories: 1 new APIs and options. Each one cited. Sources checked 2026-10-27. HTML: https://unstale.sh/npm/@fastify/websocket/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @fastify/websocket 11

### Fixes and other changes

- The handler in route() is now typed as a websocket handler when websocket: true is set. (11.3.3) — [release notes](https://github.com/fastify/fastify-websocket/releases/tag/v11.3.3)
- Socket errors during upgrade hooks are now handled. (11.3.2) — [release notes](https://github.com/fastify/fastify-websocket/releases/tag/v11.3.2)
- The custom server upgrade listener is removed when the server closes. (11.3.1) — [release notes](https://github.com/fastify/fastify-websocket/releases/tag/v11.3.1)
- Raw socket error events are now routed through the errorHandler option. (11.3.1) — [release notes](https://github.com/fastify/fastify-websocket/releases/tag/v11.3.1)

## @fastify/websocket 10

### Fixes and other changes

- Provides websocket instead of stream to avoid potential backpressure issues. (10.0.0) — [release notes](https://github.com/fastify/fastify-websocket/releases/tag/v10.0.0)

## @fastify/websocket 9

### New APIs and options

- Adds injectWS. (9.0.0) — [release notes](https://github.com/fastify/fastify-websocket/releases/tag/v9.0.0)
