Applying semantics to a diagram is the app’s responsibility. There is no way for GoJS to understand what you want to do.
You can add whatever information you like to each node data object in the model. The same is true for link data objects in a GraphLinksModel.
When you have a new question, could you start a new topic with an appropriately descriptive subject line? Note that if you ask questions about subjects that are beyond the scope of a diagramming library, we won’t be able to answer helpfully.