gql_websocket_link library

GQL WebSocket link

Classes

ConnectionAck
The server will send this acknowledgment message after receiving the init command from the client if the init was successful.
ConnectionError
The server will send this error message after receiving the init command from the client if the init was not successful.
ConnectionKeepAlive
The server will send this message to keep the connection alive
GraphQLSocketMessage
Base type for representing a server-client subscription message.
InitOperation
After establishing a connection with the server, the client will send this message to tell the server that it is ready to begin sending new subscription queries.
JsonSerializable
MessageTypes
These messages represent the structures used for Client-server communication in a GraphQL web-socket subscription. Each message is represented in a JSON format where the data type is denoted by the type field. A list of constants used for identifying message types
QueryPayload
Represent the payload used during a Start query operation. The operationName should match one of the top level query definitions defined in the query provided. Additional variables can be provided and sent to the server for processing.
StartOperation
A message to tell the server to create a subscription. The contents of the query will be defined by the payload request. The id provided will be used to tag messages such that they can be identified for this subscription instance. id values should be unique and not be re-used during the lifetime of the server.
StopOperation
Tell the server to stop sending subscription data for a particular subscription instance. See StartOperation.
SubscriptionComplete
Server message to the client to indicate that no more data will be sent for a particular subscription instance.
SubscriptionData
Data sent from the server to the client with subscription data or error payload. The user should check the errors result before processing the data value. These error are from the query resolvers.
SubscriptionError
Errors sent from the server to the client if the subscription operation was not successful, usually due to GraphQL validation errors.
UnknownData
Not expected to be created. Indicates there are problems parsing the server response, or that new unsupported types have been added to the subscription implementation.
A Universal WebSocket Link implementation to support the WebSocket-GraphQL transport. It supports subscriptions, query and mutation operations as well. [...]