repeat and until methods in Javascript Gremlin:

I'm not particularly sure how to use them properly. From my current understanding, repeat() and until() are both instance methods of the GraphTraversal class, but how do I reference any methods within the class body but still refer to the same reference?
const org = await g.V().until((r) => r.hasLabel('')).repeat({...}).path().by('name').next()

const org = await g.V().until((r) => r.hasLabel('')).repeat({...}).path().by('name').next()

What goes in the {...}? (If possible, can I see which imports you used if any in order to reference it completely? Much thanks.) For context, I'm trying to continue along in-edges until I reach a vertex labelled "b".
Solution:
I think this section of the documentation will help with imports: https://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript-imports In particular: ``` const = gremlin.process.statics; const org = await g.V().until.hasLabel('b')). repeat(__.in())....
Jump to solution
2 Replies
Solution
spmallette
spmallette13mo ago
I think this section of the documentation will help with imports: https://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript-imports In particular:
const __ = gremlin.process.statics;
const org = await g.V().until__.hasLabel('b')).
repeat(__.in()).
path().by('name').next()
const __ = gremlin.process.statics;
const org = await g.V().until__.hasLabel('b')).
repeat(__.in()).
path().by('name').next()
tobaseru
tobaseruOP13mo ago
Perfect--thank you! I'm not used to this documentation or (specifics thereof) so I appreciate you guiding my journey.
Want results from more Discord servers?
Add your server