API Reference
toWebSocket()
Creates a to web socket.
Import
import { toWebSocket } from "@graphrefly/ts/adapters";
Signature
function toWebSocket(
graph: Graph,
source: Node<T>,
request: WebSocketRequest,
sendOf: WebSocketSendOf<T>,
opts: OutboundAdapterOptions = {},
): OutboundBundle<T, WebSocketSendResult>
Parameters
| Parameter | Type | Description |
|---|---|---|
graph | Graph | Graph that owns the created nodes or projector. |
source | Node<T> | Source node that provides graph-visible input. |
request | WebSocketRequest | Request value to lower, route, or record. |
sendOf | WebSocketSendOf<T> | send of value used by the helper. |
opts | OutboundAdapterOptions | Options that configure the helper. |
Returns
The to web socket result.
Example
import { toWebSocket } from "@graphrefly/ts/adapters";
Source
packages/ts/src/adapters/environment-outbound.ts