Skip to content
PACKAGES

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 { attachObserveSink } from "@graphrefly/ts/adapters/observe-storage";
function attachObserveSink(
graph: Graph,
sink: ObserveSink<T>,
opts: AttachObserveSinkOptions<T> = {},
): ObserveSinkHandle
ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
sinkObserveSink<T>sink value used by the helper.
optsAttachObserveSinkOptions<T>Options that configure the helper.

A ObserveSinkHandle value.

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

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