Need to update graph to reflect new state - best way


I am trying to create a node with edges to a number of nodes which are in turn connected to several other nodes.

When I update state I might add or remove nodes in the middle of the tree. (green nodes in the pic)

Is the best way to try and work out what has changed programatically and then remove edges to the pink nodes, then remove edge from the blue to green and then remove the green? or is there a way to do it in one hit?



Hi @deanroker123, the upsert block is your friend.
Please review an example in a data merging context here. The upsert block is heavily used in this example and is quite versatile. Please give it a try.

Thanks I will check it out.