For deletions that the user does (typically by selecting some nodes and pressing the Delete key) you can register a “SelectionDeleted” DiagramEvent listener.
$(go.Diagram, . . .,
{ . . .,
"SelectionDeleted": function(e) {
. . . e.subject is the collection of deleted Nodes and Links . . .
}
})
For all programmatic removals of nodes from the model, whether user-initiated or in your code, you can establish a Changed listener on the Model to look for a ChangedEvent that is a removal of data from the Model.nodeDataArray.
$(go.Diagram, . . .,
{ . . .,
"ModelChanged": function(e) {
if (e.change === go.ChangedEvent.Remove && e.modelChange === "nodeDataArray") {
. . . e.oldValue will be the removed node data object . . .
}
}
})
But you probably want to send updates to the server all at once, not one at a time. Please read GoJS Changed Events -- Northwoods Software