I am a bit new to gremlin and struggling with the query to get results I want if someone has any idea. This may be an atypical use cause but it's what I currently need.
I have a DAG which will consist of two things
Groups
Elements
Groups have edges to both other groups and elements
(Again it's a DAG, so we are not worried about circularity)
Elements have no outward edges
I am looking for a query starting from given vertex, g.V("groupid") that will traverse every possible outward edge including children of that vertex and their vertices and get the list of element vertices id's. Basically trying to do recursive tree search except always searching the entire tree.
I tried something like this,
g.V().hasId('GroupVertexID').repeat(__.out()).until(__.hasLabel('Element')).toList()
From what I can tell this only has a depth of 1 though.
Any help is appreciated!