Crate coasys_juniper_graphql_ws

Crate coasys_juniper_graphql_ws 

Source
Expand description

§juniper_graphql_ws crate

Crates.io Documentation CI Rust 1.65+

This crate contains an implementation of the legacy graphql-ws GraphQL over WebSocket Protocol, as formerly used by Apollo and subscriptions-transport-ws npm package. It has now been deprecated in favor of the new graphql-transport-ws GraphQL over WebSocket Protocol, implemented by the new juniper_graphql_transport_ws crate and new graphql-ws npm package.

§License

This project is licensed under BSD 2-Clause License.

Structs§

Connection
Implements the graphql-ws protocol. This is a sink for TryInto<ClientMessage> and a stream of ServerMessage.
ConnectionConfig
ConnectionConfig is used to configure the connection once the client sends the ConnectionInit message.
ConnectionErrorPayload
The payload for errors that are not associated with a GraphQL operation.
DataPayload
Sent after execution of an operation. For queries and mutations, this is sent to the client once. For subscriptions, this is sent for every event in the event stream.
ErrorPayload
A payload for errors that can happen before execution. Errors that happen during execution are instead sent to the client via DataPayload. ErrorPayload is a wrapper for an owned GraphQLError.
StartPayload
The payload for a client’s “start” message. This triggers execution of a query, mutation, or subscription.

Enums§

ClientMessage
ClientMessage defines the message types that clients can send.
ServerMessage
ServerMessage defines the message types that servers can send.

Traits§

Init
Init defines the requirements for types that can provide connection configurations when ConnectionInit messages are received. Implementations are provided for ConnectionConfig and closures that meet the requirements.
Schema
Schema defines the requirements for schemas that can be used for operations. Typically this is just an Arc<RootNode<...>> and you should not have to implement it yourself.