Render a retain cycle as Mermaid or DOT graph
renderCycleGraphRead a .memgraph file, pick a retain cycle by index, and render it as a Mermaid or Graphviz graph highlighting app classes and cycle terminators.
Instructions
[mg.render] Read a .memgraph, pick a ROOT CYCLE by index, and emit the chain as a Mermaid graph definition (default — embeddable in markdown / GitHub) or a Graphviz DOT file. App-level classes are highlighted; CYCLE BACK terminators are styled distinctly. Use cycleIndex to render cycles other than the first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to a `.memgraph` file. | |
| cycleIndex | No | Zero-based index of the ROOT CYCLE to render (default 0 = the first cycle, usually the largest). | |
| format | No | Output format: `mermaid` (GitHub-renderable, embeddable in markdown) or `dot` (Graphviz format). | mermaid |
| maxDepth | No | Truncate the rendered graph beyond this chain depth (default 8). | |
| truncateClassName | No | Truncate long generic SwiftUI class names to this many characters (default 60). The full name still appears in node IDs. |