OperationMessage class

A basic message in the Apollo WebSocket protocol.

Constructors

OperationMessage(String type, {dynamic payload, String? id})
Builds a message of type.
OperationMessage.fromJson(Map map)
Reads a message off the wire.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
id → String?
The operation this message belongs to, absent on connection-level ones.
final
payload → dynamic
The message body, whose shape depends on type.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
One of the protocol's message types, such as gqlStart.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
The wire form of this message, with absent fields left out.
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

gqlComplete → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlConnectionAck → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlConnectionError → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlConnectionInit → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlConnectionKeepAlive → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlConnectionTerminate → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlData → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlError → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlStart → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
gqlStop → const String
Message types a server and a client exchange, as named by the Apollo subscriptions-transport-ws protocol.
legacyGqlComplete → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlConnectionAck → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlConnectionError → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlConnectionInit → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlConnectionKeepAlive → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlConnectionTerminate → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlData → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlError → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlStart → const String
The same message types under their earlier names, kept so that an older client still interoperates.
legacyGqlStop → const String
The same message types under their earlier names, kept so that an older client still interoperates.