[][src]Enum juniper_graphql_ws::ClientMessage

pub enum ClientMessage<S: ScalarValue> {
    ConnectionInit {
        payload: Variables<S>,
    },
    Start {
        id: String,
        payload: StartPayload<S>,
    },
    Stop {
        id: String,
    },
    ConnectionTerminate,
}

ClientMessage defines the message types that clients can send.

Variants

ConnectionInit

ConnectionInit is sent by the client upon connecting.

Fields of ConnectionInit

payload: Variables<S>

Optional parameters of any type sent from the client. These are often used for authentication.

Start

Start messages are used to execute a GraphQL operation.

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

Stop messages are used to unsubscribe from a subscription.

Fields of Stop

id: String

The id of the operation to stop.

ConnectionTerminate

ConnectionTerminate is used to terminate the connection.

Trait Implementations

impl<S: Debug + ScalarValue> Debug for ClientMessage<S>[src]

impl<'de, S: ScalarValue> Deserialize<'de> for ClientMessage<S> where
    S: ScalarValue
[src]

impl<S: PartialEq + ScalarValue> PartialEq<ClientMessage<S>> for ClientMessage<S>[src]

impl<S: ScalarValue> StructuralPartialEq for ClientMessage<S>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for ClientMessage<S> where
    S: RefUnwindSafe
[src]

impl<S> Send for ClientMessage<S> where
    S: Send
[src]

impl<S> Sync for ClientMessage<S> where
    S: Sync
[src]

impl<S> Unpin for ClientMessage<S> where
    S: Unpin
[src]

impl<S> UnwindSafe for ClientMessage<S> where
    S: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.