Skip to content
PACKAGES

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 { webSocketSession } from "@graphrefly/ts/adapters";
function webSocketSession(
graph: Graph,
request: WebSocketRequest,
opts: WebSocketSessionOptions = {},
): WebSocketSessionBundle
ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
requestWebSocketRequestRequest value to lower, route, or record.
optsWebSocketSessionOptionsOptions that configure the helper.

A WebSocketSessionBundle value.

import { webSocketSession } from "@graphrefly/ts/adapters";

packages/ts/src/adapters/environment-websocket-session.ts