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

feat(tenantSettings): initial implementation #3281

Merged
merged 11 commits into from
Feb 24, 2025

Conversation

golobitch
Copy link
Collaborator

@golobitch golobitch commented Feb 9, 2025

Changes proposed in this pull request

Context

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Make sure that all checks pass
  • Bruno collection updated (if necessary)
  • Documentation issue created with user-docs label (if necessary)
  • OpenAPI specs updated (if necessary)

@github-actions github-actions bot added type: tests Testing related pkg: backend Changes in the backend package. type: source Changes business logic labels Feb 9, 2025
@golobitch golobitch force-pushed the feature/tenant-settings-initial branch 4 times, most recently from 01d9f47 to 499052e Compare February 9, 2025 22:54
@golobitch golobitch force-pushed the feature/tenant-settings-initial branch from 499052e to e972e61 Compare February 9, 2025 22:55
@golobitch golobitch force-pushed the feature/tenant-settings-initial branch from 4ab4783 to 45cb48d Compare February 11, 2025 13:34
Copy link
Contributor

@mkurapov mkurapov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial comments

@mkurapov
Copy link
Contributor

function createTenantSetting() {
const options: CreateOptions = {
tenantId: tenant.id,
setting: [randomSetting()]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double-checking here, since we are checking for valid keys in the create, would this end up inserting anything?

}
}

// export const updateTenantSetting: MutationResolvers<TenantedApolloContext>['updateTenantSetting'] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can get rid of this one

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We wont have support for updating tenant settings?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see - you are going to have it in a separate PR?
I see the updateTenantSetting mutation in the backend graphql schema, so we should either uncomment this or remove the updateTenantSetting mutation from this PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's do it in separate PR so that we can unblock other tasks.

input: CreateTenantSettingsInput!
): CreateTenantSettingsMutationResponse

deleteTenantSettings(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes me think, do we want to have this mutation in general? since if a tenant gets rid of their EXCHANGE_RATES_URL for example, it would be bad 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that maybe we do not need it. I don't think that we have some string based config that can be optional for example. Should I remove this mutation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we can remove it for now

@mkurapov mkurapov linked an issue Feb 18, 2025 that may be closed by this pull request
2 tasks
@mkurapov mkurapov linked an issue Feb 18, 2025 that may be closed by this pull request
2 tasks
@golobitch golobitch force-pushed the feature/tenant-settings-initial branch from 6728b54 to 60f4020 Compare February 19, 2025 22:01
Copy link
Contributor

@mkurapov mkurapov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to approve, just removing the delete mutation and update mutation can go in separate PR

@golobitch golobitch force-pushed the feature/tenant-settings-initial branch from 60f4020 to b8c6e7f Compare February 21, 2025 20:14
@golobitch golobitch force-pushed the feature/tenant-settings-initial branch 4 times, most recently from 74288c9 to 6ee3c75 Compare February 24, 2025 21:37
@golobitch golobitch force-pushed the feature/tenant-settings-initial branch from 6ee3c75 to 12d1318 Compare February 24, 2025 21:38
@golobitch golobitch merged commit 358332e into 2893/multi-tenancy-v1 Feb 24, 2025
31 of 37 checks passed
@golobitch golobitch deleted the feature/tenant-settings-initial branch February 24, 2025 22:48
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. pkg: frontend Changes in the frontend package. pkg: mock-account-service-lib pkg: mock-ase type: source Changes business logic type: tests Testing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Multi-Tenant] tenantSettings table in backend
4 participants