For AI agents: a documentation index is available at /llms.txt
Skip to main content

ConnectionTransport

A user-suppliable transport, modeled on puppeteer's ConnectionTransport. Pass one via ConnectOptions.transport to send BrowserQL frames over your own channel instead of the built-in WebSocket. The frames it relays are graphql-transport-ws envelopes (SUBPROTOCOL) — the transport is just the pipe, Transport does the framing on top.

The library assigns onmessage/onclose/onerror after the transport is created; the transport must invoke onmessage for every frame it receives, onclose when the connection ends, and onerror on a transport error. send transmits one text frame; close tears the connection down.

Methods​

close()​

close(): void;

Returns​

void


send()​

send(message): void;

Parameters​

ParameterType
messagestring

Returns​

void

Properties​

PropertyType
onclose?(event?) => void
onerror?(error) => void
onmessage?(message) => void
Was this page helpful?