GraphReFlyTS

API Reference

attachObserveSink()

Attach adapter-owned storage to Graph.observe() read-only egress (D57/D74/D125). Writes are serialized in observe order; lifecycle barriers drain the queue without mutating graph topology.

Import

import { attachObserveSink } from "@graphrefly/ts/adapters/observe-storage";

Signature

function attachObserveSink(
	graph: Graph,
	sink: ObserveSink<T>,
	opts: AttachObserveSinkOptions<T> = {},
): ObserveSinkHandle

Parameters

ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
sinkObserveSink<T>sink value used by the helper.
optsAttachObserveSinkOptions<T>Options that configure the helper.

Returns

A ObserveSinkHandle value.

Example

import { attachObserveSink } from "@graphrefly/ts/adapters/observe-storage";

Source

packages/ts/src/adapters/observe-storage.ts