I have a graph like below
a->b
b->c
d->c
a->c
e->d
c->e
e->a
f->g
g->a
c->h
If i select c, it should return all incoming direct and indirect nodes with edges along the path.
It should return a,b,d,e,f,g
I tried below and its not working
g.V(nodeId)
.repeat(__.inE().aggregate('edges').inV().aggregate('nodes').simplePath())
.emit()
.dedup()
.cap('edges', 'nodes')
.project('edges', 'nodes')
.by(select('edges').unfold().dedup().id().fold())
.by(select('nodes').unfold().dedup().id().fold())
.next()
it is returning all the direct edges, and only one direct node, im not able to find the issue.