[graph] better logic for neighbour nodes (sorted by edge weight)

parent 7d3246b8
Pipeline #7706 passed with stages
in 23 minutes and 12 seconds