Reputation: 5550
I'd like to specify my own vertex id's. According to the docs they are supported like so
g.addV().property(id, 'customid')
with no quotes around id
. This causes JS to parse it as a variable, and it fails (undefined variable). Where do I import id
?
Upvotes: 1
Views: 1122
Reputation: 14371
try adding this to the code before you call the addV.
const { t: { id } } = gremlin.process;
That will correctly import id from gremlin.process for you.
Hope this help, Kelvin
Upvotes: 7