GraphReFlyTS

API Reference

fromSSE()

Emit server-sent events from a URL.

Import

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

Signature

function fromSSE(url: string): Operator<never, SseEvent>

Parameters

ParameterTypeDescription
urlstringSSE endpoint URL.

Returns

A source operator that emits each SSE event.

Example

fromSSE("https://example.com/events");

Source

packages/ts/src/graph/sources.ts