# Sequence diagram (SeqDiag) SeqDiag trades features for brevity. An arrow is a message, a double arrow is a call with its return, and that is most of the language. --- ## What this example shows * The => form, which draws a call and its return in one line. * Explicit return labels. * Participants ordered by first mention. --- ## A worked example Open it, edit it, or copy the source below. ![Sequence diagram (SeqDiag)](https://help.gocapable.com/images/att1423540280.svg) The source, which you can paste into a new diagram and edit: ``` seqdiag { browser -> web [label = "GET /orders"]; web => api [label = "getOrders(userId)", return = "orders"]; api => db [label = "SELECT * FROM orders", return = "rows"]; api -> cache [label = "warm cache", note = "fire and forget"]; browser <-- web [label = "200 OK"]; } ``` --- ## Making it your own * Mention participants in the order you want them drawn. * The => form halves the length of a long sequence. * For activations, alt blocks and loops, use Mermaid or PlantUML. --- ## Related [Network diagram (NWDiag)Networks as bands, with real addresses.](https://help.gocapable.com/diagrams/network-diagram-nwdiag.html) [Packet diagram (PacketDiag)Bit offsets, computed rather than drawn.](https://help.gocapable.com/diagrams/packet-diagram-packetdiag.html) [More languagesBack to the rest of these examples.](https://help.gocapable.com/diagrams/more-languages.html) --- _Specialists. Borrow one when you need it._