API Reference
webSocketSession()
Create a graph-visible D133 WebSocket SessionBundle.
The convenience start/send/close methods publish command facts only; hidden session state is driven by the command node and graph-local EnvironmentDrivers.
Import
import { webSocketSession } from "@graphrefly/ts/adapters";
Signature
function webSocketSession(
graph: Graph,
request: WebSocketRequest,
opts: WebSocketSessionOptions = {},
): WebSocketSessionBundle
Parameters
| Parameter | Type | Description |
|---|---|---|
graph | Graph | Graph that owns the created nodes or projector. |
request | WebSocketRequest | Request value to lower, route, or record. |
opts | WebSocketSessionOptions | Options that configure the helper. |
Returns
A WebSocketSessionBundle value.
Example
import { webSocketSession } from "@graphrefly/ts/adapters";
Source
packages/ts/src/adapters/environment-websocket-session.ts