You can lock your Node Editor view so that any new nodes you create do not appear in the graph.
Click this icon
to unlock your view. The
Node Editor view is locked by default.
, you can still use the following methods to create new nodes, and they appear in the
Node Editor:
on the toolbar) or
Outliner to the
Node Editor (drag and drop creation).
However, nodes created in the scene view, or by clicking in the create node pane (in other words, not drag and drop creation), do not appear in the Node Editor.