graphql-ws
6.4.1 · 15 Oct 2026MIT10.6M / weekRepositoryHomepagenpmAtom feed
Upgrading graphql-ws from 5.6.0 to 6.4.1
46 releases in betweennotes for 17
- 6+
- changes to make
- 0
- advisories fixed
- 8+
- new
- 15+
- fixes
Counted from 17 of 46 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- breaking6.0.1
- breaking6.0.0
- breaking6.0.0
- breaking6.0.0
- breaking6.0.0
- breaking6.0.0
Release by release
- fixed
Use the
jsonMessageReplacerwhen automatically responding to a ping with a pong, on both the client and the server
- fixed
- new
Add an
isProdoption to thews,uWebSockets.jsand@fastify/websocketuse-server helpers, matching the existingcrosswsoption. It controls whether internal error messages are masked withInternal server errorbefore reaching the client, defaulting to theNODE_ENV === 'production'check as before. This lets apps running in production keep reportingonConnecterror messages to the client by opting out, or mask eagerly in non-production environments. - fixed
Fix the client closing an in-use socket when many subscriptions complete at once and a new one subscribes within the
lazyCloseTimeout - fixed
Avoid an unhandled rejection when a subscription is disposed before the connection is acknowledged and the socket closes before the subscription releases its connection lock (for example, when the client is disposed while connecting and the WebSocket implementation delivers the close event on a microtask).
- new
- new
Add
onPingandonPongserver callbacks toServerOptions, similar toonConnectandonDisconnect. The callbacks receive the connectionContextas the first argument and the ping/pongpayloadas the second, allowing apps to log or react to subprotocol-level pings with access to connection state. The automatic pong reply is preserved when using the server-levelonPingcallback; the low-level websocketonPinglistener still disables the automatic reply for full manual control. - new
Allow operation IDs that match properties inherited from
Object.prototype. - fixed
Fix the client leaking memory per operation on long-living connections
- new
- new
Support crossws 0.4 by selecting the GraphQL WebSocket subprotocol during the upgrade handshake. Preserve automatic protocol negotiation in the legacy crossws 0.3 Node and uWebSockets adapters.
- fixed
Fix the CrossWS adapter ignoring socket closes issued from
server.opened
- new
- fixed
Fix typings for WebSocketServer
- fixed
- new
Add
parseoption for custom GraphQL parsing
- new
- fixed
Disposing of a client event listener twice no longer removes an unrelated listener
- fixed
- new
Add support for
graphql@17
- new
7 other lines we could not sort, mostly version bumps
- 6.0.0
The
/lib/part from imports has been removed, for examplegraphql-ws/lib/use/wsbecomesgraphql-ws/use/ws - 6.0.0
ErrorMessageuses andonErrorreturnsGraphQLFormattedError(instead ofGraphQLError) - 6.0.0
Least supported Node version is v20
- 6.0.0
Least supported
graphqlpeer dependency is ^15.10.1 and ^16 - 6.0.0
NextMessageuses andonNextreturnsFormattedExecutionResult(instead ofExecutionResult) - 6.0.0
schema,context,onSubscribe,onOperation,onError,onNextandonCompletehooks don't have the full accompanying message anymore, only the ID and the relevant part from the message - 6.0.0
Errors thrown from subscription iterables will be caught and reported through the
ErrorMessage