Enum juniper_graphql_ws::ClientMessage
source · [−]pub enum ClientMessage<S: ScalarValue> {
ConnectionInit {
payload: Variables<S>,
},
Start {
id: String,
payload: StartPayload<S>,
},
Stop {
id: String,
},
ConnectionTerminate,
}
Expand description
ClientMessage defines the message types that clients can send.
Variants
ConnectionInit
Fields
payload: Variables<S>
Optional parameters of any type sent from the client. These are often used for authentication.
ConnectionInit is sent by the client upon connecting.
Start
Fields
id: String
The id of the operation. This can be anything, but must be unique. If there are other in-flight operations with the same id, the message will be ignored or cause an error.
payload: StartPayload<S>
The query, variables, and operation name.
Start messages are used to execute a GraphQL operation.
Stop
Fields
id: String
The id of the operation to stop.
Stop messages are used to unsubscribe from a subscription.
ConnectionTerminate
ConnectionTerminate is used to terminate the connection.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.