I need to create vertices without duplication based on a list passed to inject(), the list is very large so I need to use inject(). I tried this but it didn't work:
g.inject(["Macka", "Pedro", "Albert"]).unfold().map(
coalesce(
V().has("name", identity()),
addV("user").property("name", identity())
)
)
You can try here: https://gremlify.com/765qiupxinw
Why this doesn't work? It seems that V().has() is returning all vertices, why?