Just use minus sign in front of it.
You can already filter the graph view by filename or by tag. Click on the gear icon, chose “filter” and try:
-tag:hiddento exclude any notes with the #hidden tag.-file:2022to exclude any notes with the text “2022” in the filename
Hide specific notes and links from the Graph view - Feature archive - Obsidian Forum