GraphQLWsClient class

One connected client, seen as a channel of GraphQLWsMessages.

Wraps the transport so that a server reads and writes messages rather than frames.

Inheritance

Constructors

GraphQLWsClient(StreamChannel<String> channel)
Wraps a channel of raw strings, decoding JSON on the way through.
GraphQLWsClient.withoutJson(StreamChannel<Map> channel)
Wraps a channel that already decodes JSON into maps.

Properties

channel → StreamChannel<Map>
The underlying transport, carrying decoded maps.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sink → StreamSink<GraphQLWsMessage>
The sink for sending values to the other endpoint.
no setteroverride
stream → Stream<GraphQLWsMessage>
The single-subscription stream that emits values from the other endpoint.
no setteroverride

Methods

cast<S>() → StreamChannel<S>
Returns a copy of this with the generic type coerced to S.
inherited
changeSink(StreamSink<GraphQLWsMessage> change(StreamSink<GraphQLWsMessage>)) → StreamChannel<GraphQLWsMessage>
Returns a copy of this with sink replaced by change's return value.
inherited
changeStream(Stream<GraphQLWsMessage> change(Stream<GraphQLWsMessage>)) → StreamChannel<GraphQLWsMessage>
Returns a copy of this with stream replaced by change's return value.
inherited
close() → void
Closes the transport and stops delivering messages.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pipe(StreamChannel<GraphQLWsMessage> other) → void
Connects this to other, so that any values emitted by either are sent directly to the other.
inherited
toString() → String
A string representation of this object.
inherited
transform<S>(StreamChannelTransformer<S, GraphQLWsMessage> transformer) → StreamChannel<S>
Transforms this using transformer.
inherited
transformSink(StreamSinkTransformer<GraphQLWsMessage, GraphQLWsMessage> transformer) → StreamChannel<GraphQLWsMessage>
Transforms only the sink component of this using transformer.
inherited
transformStream(StreamTransformer<GraphQLWsMessage, GraphQLWsMessage> transformer) → StreamChannel<GraphQLWsMessage>
Transforms only the stream component of this using transformer.
inherited

Operators

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