typeql
typeql copied to clipboard
Change the label of a type using TypeQL
Problem to Solve
Changing the label of a type using Graql used to be possible using the following confusing syntax:
EntityType type = tx.getEntityType("a-new-type");
Label newLabel = Label.of("a-new-new-type");
tx.execute(Graql.define(type(newLabel.getValue()).id(type.id().getValue())));
Current Workaround
Delete the type and recreate it with all of the same properties, changing the label.
Proposed Solution
We need to think about how this could be implemented in a more intuitive way.
[Triaged] @haikalpribadi I am moving it to the backlog because the issue is about adding the ability to update the label of a type, which is a new feature.