bothV
Move to both the outgoing and the incoming vertex.
Synopsis
bothV()
Description
The bothV()
step moves the traversal to both the outgoing and the incoming vertices.
Examples
Move to all adjacent vertices for all the edges in the graph:
g.E().bothV().valueMap()
Get all incoming incident edges for all vertices, then move to the all vertices that have those incident edges:
g.V().inE('knows').bothV().valueMap()
Get all incoming incident edges for all vertices, then move to the all vertices that have those incident edges and a vertex label person:
g.V().inE('knows').bothV().hasLabel('person')