Skip to content

Inspecting a graph ​

CompiledGraph.topology describes the compiled graph, which is enough to draw it or to check its shape in a test. For the graph of Parallel branches:

kotlin
val topology = graph.topology
topology.nodes                 // [web, docs, summarize]
topology.successors(START)     // [web, docs]: what can run after START
topology.edges                 // GraphEdge(from, to, isConditional) for every known arrow
topology.dynamicRoutes         // nodes whose conditional edge declares no targets
topology.subgraphs             // the topology of the graph behind each subgraph node, by its name

Released under the Apache License 2.0.