In my graph there are 2 type of labels: a and b and a boolean property travel_by.
I would like to perform BFS (with max depth of 5): start from a given node and get all the first nodes with label a.
I tried to do something like this:
g.V(<node_to_start_from>).repeat(__.both().has("travel_by", True).simplePath())
.times(5)
.until(__.hasLabel('a')).toList()
But this query is stuck for a really long time (even if I change to times(2))