GraphQLWebSocketClient
GraphQL WebSocket client implementing graphql-transport-ws protocol.
Protocol: graphql-transport-ws Spec: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md
Connection Lifecycle:
connect() - Establish WebSocket + send connection_init
Wait for connection_ack
subscribe() - Send GraphQL subscriptions
Receive next/error/complete messages
close() - Clean shutdown
Thread Safety: All methods are thread-safe and can be called from any coroutine.
Parameters
httpClient
Ktor HTTP client with WebSockets installed
url
WebSocket URL (wss://...)
connectionTimeout
Timeout for connection_ack (milliseconds)