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
| Parameter | Type | Description |
|---|---|---|
graph | Graph | Graph that owns the created nodes or projector. |
sink | ObserveSink<T> | sink value used by the helper. |
opts | AttachObserveSinkOptions<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