Open
Description
Problem to Solve
We can easily implement an extension to TypeQL - a union/disjunction of types, as an alternative to a single type label. This would make a single TypeQL query expressive without having to resort to disjunctions or separate queries.
Current Workaround
To query for instances of two types, we must do for example:
match $x isa $t; { $t type person;} or { $t type house;};
or run two separate queries.
Proposed Solution
We could instead write match $x isa person|house;
, which allows lumping two possibly disjoint types into the Label for the isa
.
This should work for anything in the query that contains a Label
constraint, and can be directly implemented by extending the grammar and the parsed Constraint to support a set of label strings.