Skip to content
PACKAGES

toWebSocket()

Creates a to web socket.

import { toWebSocket } from "@graphrefly/ts/adapters";
function toWebSocket(
graph: Graph,
source: Node<T>,
request: WebSocketRequest,
sendOf: WebSocketSendOf<T>,
opts: OutboundAdapterOptions = {},
): OutboundBundle<T, WebSocketSendResult>
ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
sourceNode<T>Source node that provides graph-visible input.
requestWebSocketRequestRequest value to lower, route, or record.
sendOfWebSocketSendOf<T>send of value used by the helper.
optsOutboundAdapterOptionsOptions that configure the helper.

The to web socket result.

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

packages/ts/src/adapters/environment-outbound.ts