I believe you’re looking for the exclude-from-graph-view property. See Option to ignore certain nodes in the graph
exclude-from-graph-view