GraphQLWebSocketServer class abstract

A GraphQL Web Socket Server implementation supporting graphql-transport-ws and graphql-ws (apollo) subprotocols.

https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md

Constructors

GraphQLWebSocketServer(RemoteClient client, {Duration? keepAliveInterval, Duration? connectionInitWaitTimeout})
Creates the server logic for receiving and responding messages through the client. The client.protocol should be in the supportedProtocols and that will determine the logic executed.

Properties

client RemoteClient
final
connectionInitWaitTimeout Duration?
final
done Future<void>
This future completes when the server has stopped executing
no setter
hashCode int
The hash code for this object.
no setterinherited
isTransportWsProtocol bool
Whether the client's protocol is graphql-transport-ws
no setter
keepAliveInterval Duration?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onConnect(RemoteClient client, [Map<String, Object?>? connectionParams]) FutureOr<bool>
onOperation(String? id, String query, [Map<String, dynamic>? variables, String? operationName, Map<String, Object?>? extensions]) FutureOr<GraphQLResult>
toString() String
A string representation of this object.
inherited

Operators

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

Constants

supportedProtocols → const List<String>
The supported web socket sub-protocols of this server