as
Label an object in a traversal to use later in the traversal.
Synopsis
as('variable\_name')
Description
The as() step is a step modulator, a helper step for another traversal step.
Examples
Label all returned person vertices as PERSON, and all created edges as RECIPE, and then select() both the vertices and edges using the assigned variable names:
g.V().hasLabel('person').as('PERSON').
out('created').as('RECIPE').
select('PERSON','RECIPE').
by('name')