I have a graph in ArangoDB with two vertices collections, P and F, and one edge collection with two types of edges: fp and hp.
Note that the image above has been simplified - the "F" nodes connect themselves to other F nodes via more "fp" edges. In other words, I do not know in advance (for example) if "F4" has an inbound "fp" edge or more.
I would like to use one AQL query to traverse the graph, starting from node PA, but stopping at any vertex that do not have an inbound "hp" edge. The Documentation indicates that the way to stop traversal is to use a query like:
FOR v, e, p IN 0..100 OUTBOUND 'P/PA'GRAPH 'test'
FILTER p.<vertices|edges>... <condition>
RETURN v
And I would like to see:
PA, PC, PE, PF
But I don't know how to achieve that without first populating a new property on the "P" nodes indicating that they have an inbound "fp" edge. If I did that, this would then be possible:
FOR v, e, p IN 0..100 OUTBOUND 'P/PA'GRAPH 'test'
FILTER p.vertices[*].hasFP ALL == true
RETURN v
Is there a way to achieve this without the pre-processing step, in one AQL query?