Skip to content
PACKAGES

Graph

Own a single graph-local topology, lifecycle, inspection index, and dispatcher boundary.

import { Graph } from "@graphrefly/ts/graph";
class Graph
import { graph } from "@graphrefly/ts/graph";
const g = graph({ name: "counter" });
const count = g.state(0, { name: "count" });
const doubled = g.derived([count], ([value]) => value * 2, { name: "doubled" });
  • Graph-local: Cross-graph dependencies require a wire bridge; direct deps stay inside one graph ownership domain.

packages/ts/src/graph/graph.ts