# `mix ussd.graph`
[🔗](https://github.com/spesohq/ussd/blob/main/lib/mix/tasks/ussd.graph.ex#L1)

    mix ussd.graph MyApp.Ussd.States.Welcome
    mix ussd.graph MyApp.Ussd.States.Welcome --output flow.mmd

Walks `transition/2` targets from the given state, rendering a
`stateDiagram-v2` Mermaid diagram. States reached only through a `back/1`
transition are collapsed into a single "Previous state" node, matching how
the session's back-stack actually behaves at runtime.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
