GraphQL: Use Common Interface for Classes

Hi @Tobias_Schweizer ! Welcome to our community :hugs:

Happy to know that you are experimenting and liking Weaviate!

AFAIK, there isn’t a way to implement such an Interface.

While you can use cross reference to create relationships between those classes, you will need to query each class with it’s properties separately.

There is a way to do multiple queries at the same request payload by leveraging GraphQL alias, like so:

 {
   Get {
     Q1: MyClass(tenant: "rep-1") {
       name
     }
     Q2: MyClass(tenant: "rep-2") {
       name
     }
   }
 }

but those queries, while in the same request, are isolated from each other.

Also, a caveat: this is not supported in our clients, so you will need to use raw() method, or call it directly.

Let me know if this helps!

Thanks!