I'm trying to pass the selected properties from one traversal to another. But it is not working with pure gremlin way.
g.V().has('pname', name).has('version', within(V().has('ecosystem', ecosystem).has('name', name).values('latest_version', 'latest_non_cve_version').))
However it works when I split the above query into multiple statements.
x = g.V().has('ecosystem', ecosystem).has('name', name).values('latest_version', 'latest_non_cve_version').toList(); g.V().has('pname', name).has('version', within(x))
Is there a way to achieve the same with pure gremlin way?