2
votes

We have a multi-graph of email connections. In this graph there are many edges between 2 nodes. Is there any cypher query to aggregate all edges between each node pairs and then return a new graph?

enter image description here

ATTENTION: I know the query that aggregate edges, but it returns a table, not graph!

1

1 Answers

1
votes

To visualize the relationships together you can use apoc's virtual relationships:

MATCH (a:Foo)-[r]->(b:Bar)
RETURN a,b, apoc.create.vRelationship(a,'COMBINED',{count:count(*)},b) as rel