I managed to get Obsidian links to work in Mermaid which is pretty finicky about case etc.
Note: It turns out you can currently only link to a note which is in a folder ; not a note in the vault root directory. You don’t have to specify the folder just prefix the note name with a slash. Strangely if a note name such as “/test” does not exist you can create the note from within Mermaid and the diagram link will work until you restart Obsidian at which point it will not find the note in the root folder . You can probably get around linking to root notes by setting up a folder containing Mermaid linked notes which embed the root notes you need access to.
Here is some code which works in the Obsidian help vault (remember to embed as inline code with backticks and Mermaid directly after the first 3 ticks):
graph LR; %% Class Definitions %% ================= classDef FixFont font-size:11px; %% Nodes %% ===== QuickStart(Quick Start):::FixFont --> CmdPalette(Command<BR>Palette):::FixFont; QuickStart --> CreateNotes("Create notes"):::FixFont; QuickStart --> InternalLinks("Internal Links"):::FixFont; click CreateNotes "/Create notes"; click CmdPalette "/Command palette"; click InternalLinks "/Internal link"; %% Internal links %% ============== class CmdPalette internal-link; class CreateNotes internal-link; class InternalLinks internal-link; %% Node styles %% =========== style CmdPalette fill:#383; style QuickStart fill:#A00; style CreateNotes fill:#03C; style InternalLinks fill:#C097;!