restoreGraph()
Restore a graph instance from a checkpoint and restore registry.
Import
Section titled “Import”import { restoreGraph } from "@graphrefly/ts/graph";Signature
Section titled “Signature”function restoreGraph( checkpoint: GraphCheckpoint, options: RestoreGraphOptions,): GraphParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
checkpoint | GraphCheckpoint | Serialized graph checkpoint to restore. |
options | RestoreGraphOptions | Restore registry and optional dispatcher/versioning overrides. |
Returns
Section titled “Returns”A live graph rebuilt from the checkpoint.
Example
Section titled “Example”import { defaultRestoreRegistry, graph, restoreGraph } from "@graphrefly/ts/graph";
const original = graph();const restored = restoreGraph(original.checkpoint(), { registry: defaultRestoreRegistry });Source
Section titled “Source”packages/ts/src/graph/restore.ts