typedb / typeql

TypeQL: the modern query language of TypeDB
https://typedb.com
Mozilla Public License 2.0
217 stars 45 forks source link

Change the label of a type using TypeQL #131

Open alexjpwalker opened 4 years ago

alexjpwalker commented 4 years ago

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.

lolski commented 3 years ago

[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.