Packages

graphql-ws

6.4.1 · 15 Oct 2026MIT10.6M / weekRepositoryHomepagenpmAtom feed

Your version

122 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 6.x · latest line
  2. 6.4.1

    15 Oct 2026
    • Use the jsonMessageReplacer when automatically responding to a ping with a pong, on both the client and the server

  3. 6.4.0

    13 Oct 2026
    • Add an isProd option to the ws, uWebSockets.js and @fastify/websocket use-server helpers, matching the existing crossws option. It controls whether internal error messages are masked with Internal server error before reaching the client, defaulting to the NODE_ENV === 'production' check as before. This lets apps running in production keep reporting onConnect error messages to the client by opting out, or mask eagerly in non-production environments.

    • Fix the client closing an in-use socket when many subscriptions complete at once and a new one subscribes within the lazyCloseTimeout

      Every completing subscription scheduled its own lazy close timeout, but only the last one got cleared on the next connect. The client now keeps a single lazy close timeout and checks for active subscriptions before closing.

    • 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).

  4. 6.3.0

    24 Sep 2026
    • Add onPing and onPong server callbacks to ServerOptions, similar to onConnect and onDisconnect. The callbacks receive the connection Context as the first argument and the ping/pong payload as 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-level onPing callback; the low-level websocket onPing listener still disables the automatic reply for full manual control.

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

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

  5. 6.2.2

    16 Sep 2026
    • 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.

    • Fix the CrossWS adapter ignoring socket closes issued from server.opened

      makeHooks only registered the peer in the clients map after server.opened returned, while send/close no-op'd unless the peer was already in that map. A protocol-mismatch close (and any other close from inside opened) was therefore dropped, the WebSocket stayed open, and no ConnectionAck was ever sent because the message handler was never installed.

  6. 6.2.1

    6 Aug 2026
    • Fix typings for WebSocketServer

  7. 6.2.0

    24 Jul 2026
    • Add parse option for custom GraphQL parsing

  8. 6.1.1

    22 Jul 2026
    • Disposing of a client event listener twice no longer removes an unrelated listener

      The unsubscribe function returned by client.on spliced at indexOf(listener) without checking for -1, so removing an already-removed listener would splice(-1, 1) and silently drop the most recently registered listener of the same event. This happens in practice without any double-dispose by the user: emits iterate over a copy of the listeners, so a one-shot internal listener that already unlistened itself during a nested emit (e.g. when client.terminate() is called from within a closed/error listener) is re-invoked from the copy and unlistens again, knocking out registered closed/error listeners.

  9. 6.1.0

    10 Jul 2026
    • Add support for graphql@17

  10. 6.0.8

    26 Mar 2026
    • Fix the server sending a Complete message after an Error message for subscriptions.

      Previously, when a subscription's async iterable threw an error, the server would send:

      {"id":"1","type":"error","payload":[{"message":"..."}]}
      {"id":"1","type":"complete"}

      Per the protocol spec:

      Error: This message terminates the operation and no further messages will be sent.

      Complete (Server → Client): If the server dispatched the Error message relative to the original Subscribe message, no Complete message will be emitted.

      The server now correctly sends only the Error message:

      {"id":"1","type":"error","payload":[{"message":"..."}]}

      Clients that correctly follow the spec should be unaffected, as they are expected to ignore messages for operations they consider already completed.

  11. 6.0.7

    27 Jan 2026
    • Remove uWebSockets.js from peer dependencies in package.json

      It does not exist on NPM anymore and could lead to weird behavior when installing dependencies with npm. Nothing else changes, using graphql-ws with uWebSockets.js still works.

  12. 6.0.6

    14 Jul 2025
    • Fix building issues causing CJS type definitions referencing ESM modules

  13. 6.0.5

    13 May 2025
    • crossws adapter for compatibility with all supported environments

  14. 6.0.4

    14 Feb 2025
    • Use Math.pow for retry delay calculation

  15. 6.0.3

    30 Jan 2025
    • Drop ExecutionPatchResult and FormattedExecutionPatchResult types

      Neither of the types are officially supported (yet) and the future versions of graphql-js adding support for stream/defer will a different signature for the incremental execution result.

  16. 6.0.2

    21 Jan 2025
    • FormattedExecutionResult errors field returns GraphQLFormattedError

  17. 6.0.1

    16 Jan 2025
  18. 6.0.0

    15 Jan 2025
  19. 5.x
  20. 5.16.2

    10 Jan 2025

    Reading the note…

  21. 5.16.1

    8 Jan 2025

    Reading the note…

  22. 5.16.0

    27 Mar 2024

    Reading the note…

  23. 5.15.0

    12 Feb 2024

    Reading the note…

  24. 5.14.3

    20 Dec 2023

    Reading the note…

  25. 5.14.2

    23 Oct 2023

    Reading the note…

  26. 5.14.1

    28 Sep 2023

    Reading the note…

  27. 5.14.0

    22 Jun 2023

    Reading the note…

  28. 5.13.1

    15 May 2023

    Reading the note…

  29. 5.13.0

    12 May 2023

    Reading the note…

  30. 5.12.1

    31 Mar 2023

    Reading the note…

  31. 5.12.0

    6 Mar 2023

    Reading the note…

  32. 5.11.3

    1 Feb 2023

    Reading the note…

  33. 5.11.2

    21 Sep 2022

    Reading the note…

  34. 5.11.1

    16 Sep 2022

    Reading the note…

  35. 5.11.0

    16 Sep 2022

    Reading the note…

  36. 5.10.2

    12 Sep 2022

    Reading the note…

  37. 5.10.1

    19 Aug 2022

    Reading the note…

  38. 5.10.0

    9 Aug 2022

    Reading the note…

  39. 5.9.1

    1 Jul 2022

    Reading the note…

  40. 5.9.0

    9 Jun 2022

    Reading the note…

  41. 5.8.2

    12 May 2022

    Reading the note…

  42. 5.8.1

    25 Apr 2022

    Reading the note…

  43. 5.8.0

    25 Apr 2022

    Reading the note…

  44. 5.7.0

    7 Apr 2022

    Reading the note…

  45. 5.6.4

    24 Mar 2022

    Reading the note…

  46. 5.6.3

    13 Mar 2022

    Reading the note…

  47. 5.6.2

    23 Feb 2022

    Reading the note…

  48. 5.6.1

    21 Feb 2022

    Reading the note…

  49. 5.6.0

    19 Feb 2022

    Reading the note…

  50. 5.5.5

    29 Oct 2021

    Reading the note…

  51. 5.5.4

    27 Oct 2021

    Reading the note…

  52. 5.5.3

    20 Oct 2021

    Reading the note…