We use Gremlin 3.2 compatible database. Actually, we try Cosmos DB in graph/gremlin mode. But I am looking to gremlin query so not necessary it is related only to Cosmos DB
The graph looks like on the image below
I have created a query that is able to capture red vertices/nodes.
g.V("A").emit().repeat(__.in('depends')).until(__.inE().count().is(0))
But struggling to extend a query to capture direct children of each vertex. On the image marked as blue ones.
Can anybody help with such a gremlin query?
Here is a query in online editor https://gremlify.com/spml2ktk03 If using the online editor:
- Actual: B->A->D->TOP
- Expected: B-> A (including info about C) -> D (including info about E) -> TOP