unstale

npm / graphql-ws

graphql-ws

What changed in graphql-ws 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

1 breaking1 security3 new APIs and options11 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

graphql-ws 616 changes

Breaking changes 1

  • Removed from graphql-ws peer dependencies because it no longer exists on npm; using graphql-ws with uWebSockets.js still works.

    6.0.7release notes

Security 1

  • The ws, uWebSockets.js, and @fastify/websocket use-server helpers now accept isProd to control whether internal error messages are masked before reaching the client.

    6.4.0release notes

New APIs and options 3

  • Adds a server callback that receives the connection Context and ping payload. Its automatic pong reply is preserved; the low-level websocket onPing listener still disables automatic replies.

    6.3.0release notes

  • Adds a server callback that receives the connection Context and pong payload, allowing apps to log or react to subprotocol-level pongs with access to connection state.

    6.3.0release notes

  • Adds a parse option for custom GraphQL parsing.

    6.2.0release notes

Fixes and other changes 11

  • The client and server now use jsonMessageReplacer when automatically responding to a ping with a pong.

    6.4.1release notes

  • The client now uses a single lazy close timeout and checks for active subscriptions before closing, preventing an in-use socket from closing when a new subscription starts within the timeout.

    6.4.0release notes

  • Avoids an unhandled rejection when a subscription is disposed before the connection is acknowledged and the socket closes before the subscription releases its connection lock.

    6.4.0release notes

  • Fixes the client leaking memory per operation on long-living connections.

    6.3.0release notes

  • Allows operation IDs that match properties inherited from Object.prototype.

    6.3.0release notes

  • Support crossws 0.4 by selecting the GraphQL WebSocket subprotocol during the upgrade handshake, while preserving automatic protocol negotiation in legacy crossws 0.3 Node and uWebSockets adapters.

    6.2.2release notes

  • The CrossWS adapter now honors socket closes issued from server.opened, preventing protocol-mismatch closes from being dropped and the WebSocket from remaining open without a ConnectionAck.

    6.2.2release notes

  • Fixes the typings for WebSocketServer.

    6.2.1release notes

  • Disposing an event listener twice no longer removes an unrelated listener, including during nested emits.

    6.1.1release notes

  • Adds support for graphql@17, allowing graphql-ws to be used with that version of graphql.

    6.1.0release notes

  • When a subscription's async iterable throws an error, the server now sends only an Error message and does not follow it with a Complete message.

    6.0.8release notes