GraphReFlyTS

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

ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
requestWebSocketRequestRequest value to lower, route, or record.
optsWebSocketSessionOptionsOptions that configure the helper.

Returns

A WebSocketSessionBundle value.

Example

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

Source

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