Expand description
Dependency-graph queries (C-049, spec/graph.md).
Pure functions over the IR DAG (Module.graph, edges
dependency → dependent): impact/why traversals, node labels,
and Mermaid/DOT/JSON renderings. Labels are names only — values
(and secrets) never appear in graph output.
Functions§
- impact_
paths - Sorted dotted paths of a node’s transitive dependents, excluding the node itself and table nodes: a changed leaf trivially rebuilds its parents, which would otherwise put every table and the root in every answer. Patch and value nodes stay — those are the consumers that matter.
- node_
label - Display label for a node: dotted path, binding name, or
node{id}for unmapped internals. - resolve_
key - Resolve a user key like the evaluator does: table fields win
ties, single segments also see
letbindings. - to_dot
- DOT digraph of the full graph (deterministic; labels escaped).
- to_
graph_ json - JSON model of the full graph: nodes with labels, edges as id pairs (deterministic).
- to_
mermaid - Mermaid flowchart of the full graph (deterministic).
- transitive_
dependencies - Transitive dependencies of a node (incoming edges), excluding the node itself, in first-visit order.
- transitive_
dependents - Transitive dependents of a node (outgoing edges), excluding the node itself, in first-visit order. Cycles terminate via the visited set (queries never evaluate, so cyclic graphs answer).
- why_
paths - Sorted dotted paths of a node’s transitive dependencies.