As recursion traversal proceeds, wouldn’t be simpler to permit only a single edge type (predicate)? If multiples were needed I think a union of result sets would suffice, which I think you already have.
Since an edge type could easily have multiple node types on the to-side (object-side?), then you’d want a filter to restrict the traversal to just the node types desired.
I liked the depth constraint.
While you’d want to avoid visiting the same node twice to avoid infinite loops, you also need a way to detect such loops. So perhaps an option to flag such a node. Sometimes this is a data quality problem. But other times (like a airplane flight round-trip), it is “normal”. In the latter case, it is the desired result and the terminating condition for the traversal.
Once the traversal is done, the results need a “projection” so that the results have the attributes from nodes/edges in the returned result. For example, on the nodes, you might need the flight number or part number. On the edges, you’d want predicted flight time or quantity respectively.
Thanks, looking nice! I have a nice set of data I’d like try with this when its ready!