question: @ Procedure @ PerformsWrites @ Description ( "apoc.refactor.mergeNodes([node1,node2]) merge nodes onto first in list" ) public Stream < NodeResult > mergeNodes ( @ Name ( "nodes" ) List < Node > nodes ) { if ( nodes . isEmpty ( ) ) return Stream . empty ( ) ; Iterator < Node > it = nodes . iterator ( ) ; Node first = it . next ( ) ; while ( it . hasNext ( ) ) { Node other = it . next ( ) ; mergeNodes ( other , first , true ) ; } return Stream . of ( new NodeResult ( first ) ) ; }
target:  Merges the nodes onto the first node. The other nodes are deleted and their relationships moved onto that first node.