Hyperlinkv0.8.0-beta.28

Graph

Graph.MermaidDiagramTypetypeeffect/Graph.ts:2221
MermaidDiagramType

Mermaid diagram types for different visualization formats.

Details

Specifies the Mermaid diagram syntax to use:

  • flowchart: For directed graphs with arrows (A --> B)
  • graph: For undirected graphs with lines (A --- B)

When not specified, automatically selects based on graph type: directed graphs use "flowchart", undirected graphs use "graph".

Example (Selecting Mermaid diagram types)

import type { Graph } from "effect"

// Force flowchart format (even for undirected graphs)
const flowchartOptions: Graph.MermaidOptions<string, string> = {
  diagramType: "flowchart"
}

// Force graph format (shows undirected connections)
const graphOptions: Graph.MermaidOptions<string, string> = {
  diagramType: "graph"
}

// Auto-detection (recommended, default behavior)
const autoOptions: Graph.MermaidOptions<string, string> = {}
models
Source effect/Graph.ts:22213 lines
export type MermaidDiagramType =
  | "flowchart" // For directed graphs
  | "graph" // For undirected graphs
Referenced by 1 symbols