GraphReFlyTS

API Reference

fromWebSocket()

Emit WebSocket events from a URL.

Import

import { fromWebSocket } from "@graphrefly/ts/sources";

Signature

function fromWebSocket(url: string): Operator<never, WebSocketEvent>

Parameters

ParameterTypeDescription
urlstringWebSocket endpoint URL.

Returns

A source operator that emits connection, message, and close events.

Example

fromWebSocket("wss://example.com/socket");

Source

packages/ts/src/graph/sources.ts