Multi-tenancy and GraphQL


I am using multi-tenancy in Weaviate and it works fine, however I can’t use the GraphQL console anymore. I don’t know how to specify my tenant. Is there a solution? I tried to search the doc but could not find anything on that.



Hey @Julien_Carme :wave:

You need to specify the tenant parameter to the class in the query:

  Get {
    SomeClass(tenant: "tenant-1") {

Please see the docs for more details

1 Like

Thanks, @parkerduckworth !!

By the way, a nice way to generate your graphql from the python client is by doing:

client.query.get("SomeClass", "someProp").with_tenant("tenant-1").build()

when you call .build() instead of the usual .do() it will yield the graphql query. For instance:

{Get{SomeClass(tenant: "tenant-1"){someProp}}}

Isn’t that cool :sunglasses: ?

1 Like