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-wsprotocol. - gqlConnectionAck → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - gqlConnectionError → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - gqlConnectionInit → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - gqlConnectionKeepAlive → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - gqlConnectionTerminate → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - gqlData → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - gqlError → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - gqlStart → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - gqlStop → const String
-
Message types a server and a client exchange, as named by the Apollo
subscriptions-transport-wsprotocol. - legacyGqlComplete → const String
- The same message types under their earlier names.
- legacyGqlConnectionAck → const String
- The same message types under their earlier names.
- legacyGqlConnectionError → const String
- The same message types under their earlier names.
- legacyGqlConnectionInit → const String
- The same message types under their earlier names.
- legacyGqlConnectionKeepAlive → const String
- The same message types under their earlier names.
- legacyGqlConnectionTerminate → const String
- The same message types under their earlier names.
- legacyGqlData → const String
- The same message types under their earlier names.
- legacyGqlError → const String
- The same message types under their earlier names.
- legacyGqlStart → const String
- The same message types under their earlier names.
- legacyGqlStop → const String
- The same message types under their earlier names.