Bybass edges in a query / Minimize path in a query

Is it possible to say in a query: we know that Accounts A1 and A5 are connected via others, let’s not draw the others, and create an artificial connection between (the green line).
It’s like creating a path in query runtime. an implicit edge…
Or maybe aggregate A2, A3, and A4 into one edge…

Hi Avi,
I’m sorry but your question is a bit unclear to me, what do you mean by let’s not draw the others?
are you trying to form a direct edge between A1 and A5 knowing there’s a path between them?

Hi Roy.
Thank you.
The question of the query is: “Are A1 and A5 connected not directly?”
The answer is “yes”.
So If I want to visualize the yes answer, I need to draw a line between A1 and A5.
To reduce noise in the view, I want to create an indication that A1 and A5 are connected by a single line, this will prevent hundreds of nodes in the view…

To find out if two nodes a and b are connected via a minimum of 2 hops you can use the following query:

MATCH (a {id:1})-[*2..]-(b {id:2}) RETURN a, b LIMIT 1

With regard to displaying the results, it all comes down to your visualisation utility.