GraphReFlyTS

API Reference

persistReactiveCollection()

D161 graph-bound sidecar over an existing collection. It writes passive storage frames and exposes adapter progress as graph-visible DATA facts; it never restores or mutates the collection.

Import

import { persistReactiveCollection } from "@graphrefly/ts/adapters";

Signature

function persistReactiveCollection(
	graph: Graph,
	collection: PersistableCollection<T, K>,
	opts: PersistReactiveCollectionOptions<K>,
): ReactiveCollectionPersistenceHandle

Parameters

ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
collectionPersistableCollection<T, K>collection value used by the helper.
optsPersistReactiveCollectionOptions<K>Options that configure the helper.

Returns

A ReactiveCollectionPersistenceHandle value.

Example

import { persistReactiveCollection } from "@graphrefly/ts/adapters";

Source

packages/ts/src/adapters/reactive-collection-storage.ts