Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-06-2022 06:16 AM
Assuming that I have a list of relationships equally spaced from the centre of the graph (imagine the sun drawing), how can I call a procedure on all matched relationships at once?
I tried the following, but to no avail:
match p=(g:CenterNode {centre: 1})-[r:MINST2*2]-(leaf)
with collect(r) as rels
unwind rels as rel
call apoc.refactor.invert(rel)
04-06-2022 07:34 AM
Binding a variable to a variable length pattern is deprecated. Use relationships of the path variable instead to get the relationships.
Do you have paths that have exactly two hops from a CenterNode and a leaf? If so, the following should work:
match p=(:CenterNode {centre: 1})-[:MINST2*2]->()
with relationships(p) as rels
unwind rels as rel
call apoc.refactor.invert(rel) yield input, output
return *
All the sessions of the conference are now available online