Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Multi-Tenant] backend Admin Tenant API #3124

Open
6 tasks
Tracked by #2893 ...
njlie opened this issue Nov 21, 2024 · 3 comments · May be fixed by #3234
Open
6 tasks
Tracked by #2893 ...

[Multi-Tenant] backend Admin Tenant API #3124

njlie opened this issue Nov 21, 2024 · 3 comments · May be fixed by #3234
Assignees
Labels
pkg: backend Changes in the backend package.

Comments

@njlie
Copy link
Contributor

njlie commented Nov 21, 2024

Add the following to backend Admin GraphQL API:

type Query {
  tenant(id: string!): Tenant
  tenants: TenantsConnection! // pagination query for tenants
  whoAmI: { id, isOperator }
}

type Mutation {
  createTenant(input: CreateTenantInput): CreateTenantMutationResponse!
  updateTenant(input: UpdateTenantInput): UpdateTenantMutationResponse!
  deleteTenant(input: DeleteTenantInput): DeleteTenantMutationResponse!
}
  • tenant query
  • "who am I" query
  • tenants query
  • createTenant mutation
  • updateTenant mutation
  • deleteTenant mutation

Prerequisites

@mkurapov
Copy link
Contributor

Deleting tenant - I'm guessing we can only do this if there are no other resources that have been created under the same tenant, correct? Under foreign key constaints

@njlie
Copy link
Contributor Author

njlie commented Nov 26, 2024

Deleting tenant - I'm guessing we can only do this if there are no other resources that have been created under the same tenant, correct? Under foreign key constaints

Come to think of it, deactivation or some kind of soft deletion makes more sense.

@mkurapov mkurapov moved this from Backlog to Todo in Rafiki Dec 6, 2024
@golobitch golobitch added this to the Multi Tenant v1 milestone Dec 20, 2024
@mkurapov
Copy link
Contributor

mkurapov commented Jan 7, 2025

After a discussion, we've realized that we need some sort of resolver that allows us to check whether the tenant making the request is an operator or not. This will allow us to show different UI elements based on whether the operator is a tenant or not.

@njlie njlie moved this from Todo to In Progress in Rafiki Jan 9, 2025
@njlie njlie linked a pull request Jan 21, 2025 that will close this issue
6 tasks
@mkurapov mkurapov linked a pull request Jan 23, 2025 that will close this issue
6 tasks
@mkurapov mkurapov moved this from In Progress to Ready for Review in Rafiki Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: backend Changes in the backend package.
Projects
Status: Ready for Review
Development

Successfully merging a pull request may close this issue.

3 participants