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

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

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

Stop messages are used to unsubscribe from a subscription.

Show fields

Fields of Stop

id: String

The id of the operation to stop.

ConnectionTerminate

ConnectionTerminate is used to terminate the connection.

Trait Implementations

Formats the value using the given formatter. Read more

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.