Skip to content
Tools/Edges/move_node

move_node

Atomic re-parent. Removes any existing hierarchy edge and creates a new one to `new_parent_id`. Validates against `UPG_EDGE_CATALOG` first; rolls back fully on failure.

Edgesatomic-with-rollback. Pre-validates the new edge before touching the old one.

Arguments

node_idstringrequired

The node to re-parent

new_parent_idstringrequired

The new parent node id

new_edge_typestringoptional

Optional override. Must be a key in UPG_EDGE_CATALOG. If omitted, the edge type is inferred from new_parent.type → node.type.

old_edge_idstringoptional

Required when the node has more than one hierarchy edge. Picks which one to delete.

Returns

Shape
{ moved: true, node_id, new_parent_id, new_edge, old_edge_id?, warning? }

The internal removed_edge field is stripped from the wire payload.

See Also