> For the complete documentation index, see [llms.txt](https://totalsoft.gitbook.io/web-app-rocket-generator/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://totalsoft.gitbook.io/web-app-rocket-generator/built-in-architecture/multi-tenancy.md).

# Multi-tenancy

If you need to handle multi-tenancy in your new application, you can just reply with yes when you are being prompted about this topic at the beginning and voilà! Everything will be done for you.

This feature include a `TenantSelector` component, which allows a user to navigate to multiple tenants. It uses a **MY\_TENANTS\_QUERY** GraphQL query, which retrieves the same information exposed by Identity SAAS. This will have to be implemented in your GraphQL server.

{% hint style="info" %}
If you use our **GraphQL Rocket Generator**, it will include all of the missing code elements you need to make this work.
{% endhint %}

```graphql
export const MY_TENANTS_QUERY = gql`
  query {
    myTenants {
    externalId
    name
    code
    tier
    isActive
    tenant {
    id
    name
    code
    }
  }
}
`
```

In addition, the default `AuthenticationProvider` will be replaced with a specialized one who manages the multi-tenancy logic.
