Is there a way to hop from a starting vertex to the very end of paths when we don’t know how many hops it takes to go to the very end?
For example, I want to know all possible acquittances based on who she is friends with and who her friends are friends with and so on. I want to collect the edge attributes such as date the two vertices became friends for each hop.
Jane Doe ----(friendship 01/23/2009)—> John Doe
John Doe ----(friendship 03/17/2009) —> Mary Jane
Mary Jane —(friendship 01/03/2011) —> Peter Parker
Peter Parker --(friendship 09/15/2016) —> Toby McGuire
Eventually, I want the query result to look like this:
Jane Doe, John Doe, 01/23/2001
Jane Doe, Mary Jane, 03/17/2009
Jane Doe, Peter Parker 01/03/2011
Jane Doe, Toby McGuire 09/15/2016
This has 4 hops but I don’t know that since I don’t have knowledge of the whole graph.
How do I write this without using a ton of accumulators for each hop? And how do I write a query so that it will continue to hop until it reaches the end of the maximum number of hops it can take?
Thank you!