Expand description

§graphql-ws-client

graphql-ws-client implements asynchronous GraphQL-over-Websocket using the graphql-transport-ws protocol. It is websocket client, graphql client and async runtime agnostic. Built in support is provided for:

If you’d like to use another client or adding support should be trivial.

use graphql_ws_client::Client;
use std::future::IntoFuture;
use futures::StreamExt;

let mut stream = Client::build(connection).subscribe(subscription).await?;

while let Some(response) = stream.next().await {
    // Do something with response
}

See the examples for more thorough usage details.

Modules§

  • This module contains traits that abstract over GraphQL implementations, allowing this library to be used with different GraphQL client libraries.
  • Contains traits to provide support for various underlying websocket clients.
  • ws_stream_wasmws_stream_wasm
    Integration with the ws_stream_wasm library

Structs§

Enums§

  • Error type
  • A websocket message
  • WasmWebsocketMessagews_stream_wasm
    A WebSocket event abstraction to combine the differentiated WebSocket events and messages of ws_stream_wasm.

Traits§

  • Abstrction around a websocket connection.

Functions§

Type Aliases§

  • CynicClientDeprecatedcynic
    A websocket client for the cynic graphql crate
  • CynicClientBuilderDeprecatedcynic
    A websocket client builder for the cynic graphql crate
  • GraphQLClientClientDeprecatedclient-graphql-client
    A websocket client for the graphql_client graphql crate
  • GraphQLClientClientBuilderDeprecatedclient-graphql-client
    A websocket client builder for the graphql_client graphql crate