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

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.