I am trying to build a chaining mechanism with my query and I want to start my next invocation from the end of the previous. I've tried using the by step, but I can't seem to get it to work or do what I would like. What is the best way to get the last vertex in all the paths from the below query?
g.V(1).repeat(out()).times(2).emit().path();
If this returned:
[v[1], v[2], v[3]]
[v[1], v[3], v[4]]
All I want is:
v[3]
v[4]
Thanks!