option
An option for branch() or choose().
Synopsis
option(value, value\_returned)
Description
The option() step modulator is used in conjunction with branch() or choose(), and specifies the returned values based on values found at that point in a traversal.
Examples
Find all people and list whether they are female, male, or unknown:
g.V().hasLabel('person').
project('name','gender').
by('name').
by(choose(values('gender')).
option('F', constant('female')).
option('M', constant('male')).
option(none, constant('unknown')))