Why is T.label immutable and do we have to create a new node to change a label?

We cannot do g.V('some label').property(T.label, 'new label').iterate() ? Is this correct? Thank you
Solution
you have a few questions here @Julius Hamilton

Why is T.label immutable
i'm not sure there's a particular reason except to say that many graphs have not allowed that functionality so TinkerPop hasn't offered a way to do it.
and do we have to create a new node to change a label?
yes
We cannot do g.V('some label').property(T.label, 'new label').iterate()
no, because you can't modify the label as mentioned earlier, but also V() does not take a
label
as an argument. it would be more correct to do g.V().hasLabel('some label').property(...) to modify all things with a particular label (but, again
label
and
id
cannot be one of those things. you'd have to sort of clone the vertex. there are some patterns for doing it: https://stackoverflow.com/q/51900116/1831717

also, in the future, i think a mutable label probably should be allowed. we'll see how that comes to pass.
Stack Overflow
Does gremlin provide the ability to clone a vertex for instance
v1->v2, v1->v3, v1->v4 how can I simply and efficiently create a new vertex v5 that also has edges that point to v2, v3, v4 ...
Was this page helpful?