I have nodes with label A
. Some of them are connected with the relationship TEST
(see Figure A).
I want to MATCH
the groups of connected nodes, create a new node B
for each group and create a relationship from each member of the group to the new node B
(see Figure B). I know that the groups are small, never more then 3 steps of TEST
relationships.
How can I MATCH
the A
nodes and return connected groups? Is there a graph algorithm implemented in APOC?