fromWebSocketWithOptions()
Emit WebSocket events using a caller-supplied request object.
Import
Section titled “Import”import { fromWebSocketWithOptions } from "@graphrefly/ts/sources";Signature
Section titled “Signature”function fromWebSocketWithOptions(request: WebSocketRequest): Operator<never, WebSocketEvent>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
request | WebSocketRequest | WebSocket request details. |
Returns
Section titled “Returns”A source operator that emits connection, message, and close events.
Example
Section titled “Example”fromWebSocketWithOptions({ url: "wss://example.com/socket" });Source
Section titled “Source”packages/ts/src/graph/sources.ts