Expand description
§juniper_graphql_transport_ws crate
This crate contains an implementation of the new graphql-transport-ws GraphQL over WebSocket Protocol, as now used by Apollo and graphql-ws npm package.
Implementation of the legacy graphql-ws GraphQL over WebSocket Protocol may be found in the juniper_graphql_ws crate.
§License
This project is licensed under BSD 2-Clause License.
Structs§
- ArcSchema
- This exists as a work-around for this issue: https://github.com/rust-lang/rust/issues/64552
- Connection
- Implements the
graphql-wsprotocol. This is a sink forTryInto<Input>messages and a stream ofOutputmessages. - Connection
Config - ConnectionConfig is used to configure the connection once the client sends the ConnectionInit message.
- Error
Payload - A payload for errors that can happen before execution. Errors that happen during execution are
instead sent to the client via
NextPayload.ErrorPayloadis a wrapper for an ownedGraphQLError. - Next
Payload - 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.
- Subscribe
Payload - The payload for a client’s “start” message. This triggers execution of a query, mutation, or subscription.
Enums§
- Client
Message - ClientMessage defines the message types that clients can send.
- Input
- Possible inputs received from a client.
- Output
- Output provides the responses that should be sent to the client.
- Server
Message - 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
ConnectionConfigand 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.