I want to create a cypher so that while executing it will display all outgoing connections and deeper connections and return statement should have only one variable
Are these two paths related? As written, you will get the Cartesian product of the two path results. Also, each match can’t end in a ‘return’ if they are executed together.
you could return both paths in your result and extract each in your code. Like this, but again you will get the Cartesian product of the two path results. That doesn’t seem like something you would want.