Implementing and querying a multiple-inheritance


Hi all,

I’m interested in modelling an ontology where entities inherit related “properties” (also entities) from other entities.

I have written a small example, with two types of relations:

  1. IngredientOf
  2. InheritsFrom

And added the following instances:
drink has water as an ingredient.
sweetDrink inherits from drink and has sugar as an ingredient.
coffeeDrink inherits from drink and has coffee as an ingredient.
sweetCoffee inherits from sweetDrink and coffeeDrink.

My goal is to query sweetCoffee’s ingredients as fast as possible from a Java API.

I didn’t want to over-complicate the example, but my ingredients also have ingredients, and can inherit them from other ingredients as well, etc.

What is the best approach to do this with Graql/Graph APIs?


Hi @Ilya,

At this stage we do not support multiple inheritance. We have been discussing supporting it though but I can’t give you an exact timeline. It will likely be one of the features we will be introducing after our 1.0 release.