Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/client / / openSseTransport
Function: openSseTransport()
ts
function openSseTransport(options, listeners): Promise<Transport>;Defined in: packages/client/src/transport/sse.ts:33
Open an SSE transport. Resolves once the underlying EventSource fires open; rejects with a typed TransportFailedError on construction failure.
The auth strategy must be 'bearer' — SSE has no equivalent of the WebSocket ticket flow because EventSource does not allow custom headers in browsers either. SDK / server-to-server clients should use the optional EventSource injection seam to provide a polyfill that DOES allow headers (e.g. eventsource@2.x on Node).
Parameters
| Parameter | Type |
|---|---|
options | TransportOptions |
listeners | TransportListeners |
Returns
Promise<Transport>