Enum juniper_graphql_ws::ClientMessage [−][src]
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 is sent by the client upon connecting.
Show fields
Fields of ConnectionInit
payload: Variables<S>
Optional parameters of any type sent from the client. These are often used for authentication.
Start messages are used to execute a GraphQL operation.
Show fields
Fields of Start
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.
Stop messages are used to unsubscribe from a subscription.
Show fields
Fields of Stop
id: String
The id of the operation to stop.
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 !=
.
Auto Trait Implementations
impl<S> RefUnwindSafe for ClientMessage<S> where
S: RefUnwindSafe,
impl<S> Send for ClientMessage<S> where
S: Send,
impl<S> Sync for ClientMessage<S> where
S: Sync,
impl<S> Unpin for ClientMessage<S> where
S: Unpin,
impl<S> UnwindSafe for ClientMessage<S> where
S: UnwindSafe,