Sorry, but I still cannot figure out what you are asking. Please use more words and small screenshots to describe what you want, both before and after events or actions, and how things should be different or the same for different nodes or links.
Use the normal ways of customizing the objects that are shown.
As demonstrated in https://gojs.net/latest/intro/contextmenus.html and in many of the samples such as https://gojs.net/latest/samples/basic.html, if you have a set of context menu buttons only some of which should apply to the specific node, you can use a Binding on each button’s visible property to hide or show each button.
Or you could bind the node’s contextMenu property to be of several predefined "ContextMenu"s that you set up once when you initialize your app.
Or you could do both.
Or you could implement whatever you want in HTML. Read more starting at https://gojs.net/latest/intro/contextmenus.html#HTMLContextMenus.