finds.dev

enisdenjo/graphql-ws

Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client.

View on GitHubHomepage ↗

★ 1,870TypeScriptMITupdated Sep 2026

// the take

graphql-ws is a GraphQL over WebSocket server and client that implements the sub-protocol written up in PROTOCOL.md, with no runtime dependencies. It is for teams that need GraphQL subscriptions over WebSockets and want to move off the deprecated subscriptions-transport-ws, which it explicitly does not interoperate with.

- The protocol logic is separate from transport. The src/use directory holds thin adapters for ws, uWebSockets, Fastify, Bun, Deno and crossws, so switching server runtime does not mean rewriting the message handling.

- The protocol is documented in PROTOCOL.md, and the tests cover the server, client, common code and each adapter. You can check behaviour against the spec rather than reverse-engineering it from the source.

- Zero runtime dependencies keeps the install small and leaves no transitive packages to audit for what is essentially a message state machine.

- The client's lazy mode opens the socket for the first subscription and closes it when the last one completes, which suits apps where most sessions never subscribe.

- The README is mostly links to an external website for the get-started guide, recipes and API docs. Someone reading only the repo learns little about configuration options.

- It is a bespoke sub-protocol, not Apollo's. Both ends have to speak graphql-ws, so any client you do not control, or any existing subscriptions-transport-ws client, needs a migration or a separate implementation.

- The README does not explain what lazy mode costs. Subscriptions that come and go in quick succession will close and reopen the socket each time, and the first subscription pays the connection and handshake latency.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,870
Forks
184
Language
TypeScript
License
MIT
Last commit
28 Sep 2026

// nearby

If graphql-ws isn't quite it.

All repos →