Is it possible to exclude folders from graph view but not from search

First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.

What I’m trying to do

As per title. Any solutions?

You can use Groups and Search queries:

https://help.obsidian.md/Plugins/Graph+view#Groups