Hi,
Are you using dse-graph package?
If so, you can specify parameters when building the traversal:
const key = 'john';
const names = await g.V().has('key', key).out('friends').values('name').toList();
Using TinkerPop traversal API, there's currently no way to build the traversal once and reuse it binding different parameters. The recommended way is to build a new traversal each time from the GraphTraversalSource (reusing the GraphTraversalSource instance across your application but not the GraphTraversal).
Thanks,
Jorge