githubEdit

buildingTenant

Tenant Type

Represents a tenant in the multi-tenant system. A tenant is an isolated organizational unit that contains users, roles, groups, and other resources.

Fields

Field
Type
Description

id

ID!

Unique identifier of the tenant

createdAt

Time!

Creation timestamp

createdBy

UUID!

User identifier who created the tenant

updatedAt

Time

Last update timestamp

updatedBy

UUID

User identifier who last updated the tenant

deletedAt

Time

Deletion timestamp

deletedBy

UUID

User identifier who deleted the tenant

name

String!

Name of the tenant

idpOrgRef

String!

Identity provider organization reference

Connection Fields

The tenantUsers field returns a Connection object that supports pagination, filtering, and ordering.

tenantUsers Connection

tenantUsers(
  after: Cursor
  first: Int
  before: Cursor
  last: Int
  orderBy: UserOrder
  where: UserWhereInput
): UserConnection!
Argument
Type
Description

after

Cursor

Returns elements after this cursor

first

Int

Returns the first n elements

before

Cursor

Returns elements before this cursor

last

Int

Returns the last n elements

orderBy

UserOrder

Ordering options for users

where

UserWhereInput

Filtering options for users

Interfaces

  • Node

Usage Example

Query with Filtering on Users

Relations

  • Tenant 1:N User: A tenant can have multiple users

Purpose

Tenants provide multi-tenancy support in pyck, allowing complete data isolation between different organizations or customers. Each tenant has its own users, roles, groups, and other resources. The idpOrgRef field links the tenant to an organization in the identity provider (Zitadel).

Last updated

Was this helpful?