fix: handle billingSubscriptions gql field if billing is disabled (#9767)

Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
This commit is contained in:
Etienne
2025-01-21 16:47:19 +01:00
committed by GitHub
parent 34afd73923
commit 75ba270ba8

View File

@ -167,6 +167,10 @@ export class WorkspaceResolver {
async billingSubscriptions(
@Parent() workspace: Workspace,
): Promise<BillingSubscription[] | undefined> {
if (!this.environmentService.get('IS_BILLING_ENABLED')) {
return [];
}
try {
return this.billingSubscriptionRepository.find({
where: { workspaceId: workspace.id },