Simple question about printing vertex labels

I am creating a graph in the gremlin cli by doing graph = TinkerGraph.open(), g = graph.traversal(), g.addV("somelabel"). i can confirm a vertex was created. i can do g.V().valueMap(true) and it shows ==>[id:0,label:documents]. But I so far do not know how to print information about a vertex via its index. I have tried g.V(0) but it doesnt print anything.
Solution:
By default, IDs are stored as longs. You likely need to use g.V(0L) in Gremlin Console to return the vertex that you created.
Jump to solution
2 Replies
Solution
triggan
triggan3mo ago
By default, IDs are stored as longs. You likely need to use g.V(0L) in Gremlin Console to return the vertex that you created.
Julius Hamilton
Julius HamiltonOP3mo ago
Aha. I see. 👍
Want results from more Discord servers?
Add your server