21 releases (11 breaking)

Uses new Rust 2024

new 0.12.0 Jan 11, 2026
0.11.1 Oct 29, 2024
0.10.2 Aug 21, 2024
0.10.1 Jun 8, 2024
0.1.0 Apr 4, 2021

#22 in WebSocket

Download history 6209/week @ 2025-09-23 6812/week @ 2025-09-30 6775/week @ 2025-10-07 4875/week @ 2025-10-14 7141/week @ 2025-10-21 4975/week @ 2025-10-28 6996/week @ 2025-11-04 7482/week @ 2025-11-11 10836/week @ 2025-11-18 10151/week @ 2025-11-25 9725/week @ 2025-12-02 11435/week @ 2025-12-09 8835/week @ 2025-12-16 2524/week @ 2025-12-23 4416/week @ 2025-12-30 9836/week @ 2026-01-06

27,559 downloads per month
Used in 10 crates (6 directly)

Apache-2.0

74KB
1.5K SLoC

GraphQL Websocket Client

Runtime agnostic graphql websocket client

Crate Info API Docs Discord Chat

Examples | Changelog

Overview

The goal of this library is to provide a runtime agnostic implementation for GraphQL-over-Websockets.

The library only supports subscriptions for now but will eventually support queries and mutations.

It supports the websocket libraries async-tungstenite, tokio-tungstenite and ws-stream-wasm, and

Tungstenite Versions

As the tungstenite library is pre-1.0 graphql-ws-client provides support for a range of versions. You can select which version of tungestenite you want using the tungstenite-0-xx feature flags. Note that only one of these can be active at any time, or graphql-ws-client won't compile. Because of these limitations only one tungstenite version will be tested on the grapqhl-ws-client CI, as a result the other versions may not compile or work corectly.

Integrations

The library offers integrations with some popular GraphQL clients with feature flags:

Documentation

The documentation is quite limited at the moment, here are some sources:

  1. The provided examples
  2. The reference documentation on docs.rs

Logging

By default, the library will log some messages at the trace level to help you debug. It is possible to turn off the logging entirely by using the no-logging feature.

Dependencies

~1.3–4.5MB
~90K SLoC