TransportWSMessage class

A message of the graphql-transport-ws protocol.

See: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md

Constructors

TransportWSMessage(String type, {String? id, Object? payload})
const
TransportWSMessage.fromJson(Object? json)
Reads a message from its JSON object; throws a FormatException if it has no string type, or an id that is not a string.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
id → String?
The operation this message is of, if any.
final
payload → Object?
The payload of this message, if any.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
The type of this message.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

complete → const String
Sent by the server when an operation is done, and by the client to stop one.
connectionAck → const String
Sent by the server to accept a connection.
connectionInit → const String
Sent by the client to open a connection, with an optional payload such as credentials.
error → const String
The errors that ended an operation; no complete follows.
next → const String
A result of an operation.
ping → const String
Sent by either side; the other replies with pong.
pong → const String
The reply to a ping, or a heartbeat of its own.
subscribe → const String
Sent by the client to start an operation, of an id it chooses.