How to get the depth of every node after calling the BFS algorithm in gds?It seems that the result 'path' is a graph, but I want a map with a node id and its depth. I don't know how to write cypher statement.
Sorry, I think this is wrong .Using the cypher code you offered, we can only get one row returned. And the path is in the traversal order of nodes, not the depth order. There exsists edge between the nodes with the same depth.
I think there are no ways to get the depth of every node through gds.bfs... But this is really strange for me to understand...
I see in your diagram you have ‘Next’ and ‘Edge’ relationship types. Does ‘Next’ represent a change in depth and ‘Edge’ represents nodes at the same depth? If so, you could derive the depth of each node along the path from the relationship types.