Hiding a linked mention on graph view

Things I have tried

Hello!
I am super new to obsidian so forgive me if this question has been answered or if the solution is simple (I have tried searching the forum though).
I am creating a vault to use as a rapid reference for various programming languages and mathematics, the nature of the project means that I very frequently am defining functions, commands, terms, etc., as well as giving short examples of them. I would like to contain all of these in their own respective file (one file for examples, one for definitions), with mentions linking to the header that defines the given function or definition. My problem is that I am doing this so frequently that my graph view becomes a mess. I am wondering if there is a way to have a mentioned link from one file to another, but hide that file completely from graph view?

What I’m trying to do

Hi, Owen.

I am facing a similar issue, and although this solution does not help my case specifically (no preview for such links), it could help yours.