diff --git a/packages/twenty-front/src/generated/graphql.tsx b/packages/twenty-front/src/generated/graphql.tsx index 058d13f80..b9b22f8f6 100644 --- a/packages/twenty-front/src/generated/graphql.tsx +++ b/packages/twenty-front/src/generated/graphql.tsx @@ -30,6 +30,11 @@ export type Analytics = { success: Scalars['Boolean']; }; +export type ApiConfig = { + __typename?: 'ApiConfig'; + mutationMaximumRecordAffected: Scalars['Float']; +}; + export type ApiKeyToken = { __typename?: 'ApiKeyToken'; token: Scalars['String']; @@ -136,6 +141,7 @@ export enum CaptchaDriverType { export type ClientConfig = { __typename?: 'ClientConfig'; + api: ApiConfig; authProviders: AuthProviders; billing: Billing; captcha: Captcha; @@ -1229,7 +1235,7 @@ export type UpdateBillingSubscriptionMutation = { __typename?: 'Mutation', updat export type GetClientConfigQueryVariables = Exact<{ [key: string]: never; }>; -export type GetClientConfigQuery = { __typename?: 'Query', clientConfig: { __typename?: 'ClientConfig', signInPrefilled: boolean, signUpDisabled: boolean, debugMode: boolean, chromeExtensionId?: string | null, authProviders: { __typename?: 'AuthProviders', google: boolean, password: boolean, microsoft: boolean }, billing: { __typename?: 'Billing', isBillingEnabled: boolean, billingUrl?: string | null, billingFreeTrialDurationInDays?: number | null }, telemetry: { __typename?: 'Telemetry', enabled: boolean }, support: { __typename?: 'Support', supportDriver: string, supportFrontChatId?: string | null }, sentry: { __typename?: 'Sentry', dsn?: string | null, environment?: string | null, release?: string | null }, captcha: { __typename?: 'Captcha', provider?: CaptchaDriverType | null, siteKey?: string | null } } }; +export type GetClientConfigQuery = { __typename?: 'Query', clientConfig: { __typename?: 'ClientConfig', signInPrefilled: boolean, signUpDisabled: boolean, debugMode: boolean, chromeExtensionId?: string | null, authProviders: { __typename?: 'AuthProviders', google: boolean, password: boolean, microsoft: boolean }, billing: { __typename?: 'Billing', isBillingEnabled: boolean, billingUrl?: string | null, billingFreeTrialDurationInDays?: number | null }, telemetry: { __typename?: 'Telemetry', enabled: boolean }, support: { __typename?: 'Support', supportDriver: string, supportFrontChatId?: string | null }, sentry: { __typename?: 'Sentry', dsn?: string | null, environment?: string | null, release?: string | null }, captcha: { __typename?: 'Captcha', provider?: CaptchaDriverType | null, siteKey?: string | null }, api: { __typename?: 'ApiConfig', mutationMaximumRecordAffected: number } } }; export type SkipSyncEmailOnboardingStepMutationVariables = Exact<{ [key: string]: never; }>; @@ -2355,6 +2361,9 @@ export const GetClientConfigDocument = gql` provider siteKey } + api { + mutationMaximumRecordAffected + } chromeExtensionId } } diff --git a/packages/twenty-front/src/modules/client-config/graphql/queries/getClientConfig.ts b/packages/twenty-front/src/modules/client-config/graphql/queries/getClientConfig.ts index 6b9806716..a7893a558 100644 --- a/packages/twenty-front/src/modules/client-config/graphql/queries/getClientConfig.ts +++ b/packages/twenty-front/src/modules/client-config/graphql/queries/getClientConfig.ts @@ -32,6 +32,9 @@ export const GET_CLIENT_CONFIG = gql` provider siteKey } + api { + mutationMaximumRecordAffected + } chromeExtensionId } } diff --git a/packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.ts b/packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.ts index 8252db6ba..96788bef2 100644 --- a/packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.ts @@ -65,6 +65,12 @@ class Captcha { siteKey: string | undefined; } +@ObjectType() +class ApiConfig { + @Field(() => Number, { nullable: false }) + mutationMaximumRecordAffected: number; +} + @ObjectType() export class ClientConfig { @Field(() => AuthProviders, { nullable: false }) @@ -96,4 +102,7 @@ export class ClientConfig { @Field(() => String, { nullable: true }) chromeExtensionId: string | undefined; + + @Field(() => ApiConfig) + api: ApiConfig; } diff --git a/packages/twenty-server/src/engine/core-modules/client-config/client-config.resolver.ts b/packages/twenty-server/src/engine/core-modules/client-config/client-config.resolver.ts index 4ce91428c..2384e725c 100644 --- a/packages/twenty-server/src/engine/core-modules/client-config/client-config.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/client-config/client-config.resolver.ts @@ -46,6 +46,11 @@ export class ClientConfigResolver { siteKey: this.environmentService.get('CAPTCHA_SITE_KEY'), }, chromeExtensionId: this.environmentService.get('CHROME_EXTENSION_ID'), + api: { + mutationMaximumRecordAffected: this.environmentService.get( + 'MUTATION_MAXIMUM_RECORD_AFFECTED', + ), + }, }; return Promise.resolve(clientConfig);