GraphReFlyTS

API Reference

filterObserve()

Filter a read-only observe egress stream without turning it into a graph node.

The source stream owns ordering and lifecycle; this helper only decides whether to forward each ObserveEvent and returns the source unsubscribe unchanged.

Import

import { filterObserve } from "@graphrefly/ts/graph";

Signature

function filterObserve(
	stream: ObserveStream,
	predicate: ObservePredicate,
): ObserveStream

Parameters

ParameterTypeDescription
streamObserveStreamstream value used by the helper.
predicateObservePredicatepredicate value used by the helper.

Returns

A ObserveStream value.

Example

import { filterObserve } from "@graphrefly/ts/graph";

Source

packages/ts/src/graph/inspect.ts