topological_sort
Generic Description
Produce an order consistent with DAG dependencies.
Simple example:
CALL nexyron.topological_sort()
Component and ordering procedures describe reachability structure: which nodes belong to the same connected region, which directed regions are mutually reachable, or which order respects dependency edges.
Consumer-Level Explanation
Use topological_sort when produce an order consistent with DAG dependencies is the graph-analysis or operational question you actually need to answer. Keep the call explicit because its YIELD columns, row grain, and required runtime state determine how the rest of the Cypher pipeline can safely compose it. Use these procedures to understand graph feasibility and dependency shape before running heavier algorithms or interpreting isolated metric scores.
Conceptual Explanation
topological_sort should be read as one named procedure contract in the broader Nexyron Cypher surface. The procedure call is not only a syntax hook: it defines what runtime state, projection, registry entry, or graph algorithm is being asked to operate, and it determines which output columns downstream YIELD, WITH, and RETURN stages can safely use.
More Detailed Explanation
This differs from traversal by aiming for dependency-respecting ordering rather than generic exploration
In practical queries, start by deciding the row grain you want after the call: one row per node, one row per path, one row per registry object, one row per artifact, or one row per summary. Then keep that grain explicit with YIELD and named projections. That is the difference between a useful planner-facing example and a vague call that downstream tooling cannot safely compose. For contract-driven procedures, the executable examples on these pages intentionally inspect procedure metadata unless the required named artifacts are created in the same example.
How It Differs From Nearby Algorithms
This differs from traversal by aiming for dependency-respecting ordering rather than generic exploration.
Advanced Example
This example yields named columns from topological_sort and returns a bounded result shape that downstream planner tooling can compose without guessing column names or row grain.
CALL nexyron.topological_sort() YIELD node_id, order
RETURN node_id, order
LIMIT 10
Real Use Cases
- build/deploy order reasoning
- workflow execution order
- dependency explanation
- compare algorithm output with domain labels or time windows before operationalizing it
- feed graph-analytic scores into ranked reports, feature contracts, or investigation queues only after checking the modeling assumptions
Real Limitations And Tradeoffs
- requires acyclic structure; cycles invalidate the premise
- algorithm output reflects the projected graph, not an abstract real-world network outside the data model
- nearby algorithms can answer different questions even when their output columns look similar