mirror of
https://github.com/lingble/twenty.git
synced 2025-11-02 05:37:56 +00:00
Add mutationMaximumRecordAffected to clientConfig (#6039)
We are exposing the server mutationMaximumRecordAffected value via clientConfig so it can be used by the FE. This is a first step for https://github.com/twentyhq/twenty/issues/6025 <img width="610" alt="Screenshot 2024-06-26 at 14 58 26" src="https://github.com/twentyhq/twenty/assets/1834158/9d192976-fd22-45d2-bdaa-a8ff6bb90ca2">
This commit is contained in:
@@ -30,6 +30,11 @@ export type Analytics = {
|
|||||||
success: Scalars['Boolean'];
|
success: Scalars['Boolean'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type ApiConfig = {
|
||||||
|
__typename?: 'ApiConfig';
|
||||||
|
mutationMaximumRecordAffected: Scalars['Float'];
|
||||||
|
};
|
||||||
|
|
||||||
export type ApiKeyToken = {
|
export type ApiKeyToken = {
|
||||||
__typename?: 'ApiKeyToken';
|
__typename?: 'ApiKeyToken';
|
||||||
token: Scalars['String'];
|
token: Scalars['String'];
|
||||||
@@ -136,6 +141,7 @@ export enum CaptchaDriverType {
|
|||||||
|
|
||||||
export type ClientConfig = {
|
export type ClientConfig = {
|
||||||
__typename?: 'ClientConfig';
|
__typename?: 'ClientConfig';
|
||||||
|
api: ApiConfig;
|
||||||
authProviders: AuthProviders;
|
authProviders: AuthProviders;
|
||||||
billing: Billing;
|
billing: Billing;
|
||||||
captcha: Captcha;
|
captcha: Captcha;
|
||||||
@@ -1229,7 +1235,7 @@ export type UpdateBillingSubscriptionMutation = { __typename?: 'Mutation', updat
|
|||||||
export type GetClientConfigQueryVariables = Exact<{ [key: string]: never; }>;
|
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; }>;
|
export type SkipSyncEmailOnboardingStepMutationVariables = Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
@@ -2355,6 +2361,9 @@ export const GetClientConfigDocument = gql`
|
|||||||
provider
|
provider
|
||||||
siteKey
|
siteKey
|
||||||
}
|
}
|
||||||
|
api {
|
||||||
|
mutationMaximumRecordAffected
|
||||||
|
}
|
||||||
chromeExtensionId
|
chromeExtensionId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ export const GET_CLIENT_CONFIG = gql`
|
|||||||
provider
|
provider
|
||||||
siteKey
|
siteKey
|
||||||
}
|
}
|
||||||
|
api {
|
||||||
|
mutationMaximumRecordAffected
|
||||||
|
}
|
||||||
chromeExtensionId
|
chromeExtensionId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,12 @@ class Captcha {
|
|||||||
siteKey: string | undefined;
|
siteKey: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ObjectType()
|
||||||
|
class ApiConfig {
|
||||||
|
@Field(() => Number, { nullable: false })
|
||||||
|
mutationMaximumRecordAffected: number;
|
||||||
|
}
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
export class ClientConfig {
|
export class ClientConfig {
|
||||||
@Field(() => AuthProviders, { nullable: false })
|
@Field(() => AuthProviders, { nullable: false })
|
||||||
@@ -96,4 +102,7 @@ export class ClientConfig {
|
|||||||
|
|
||||||
@Field(() => String, { nullable: true })
|
@Field(() => String, { nullable: true })
|
||||||
chromeExtensionId: string | undefined;
|
chromeExtensionId: string | undefined;
|
||||||
|
|
||||||
|
@Field(() => ApiConfig)
|
||||||
|
api: ApiConfig;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ export class ClientConfigResolver {
|
|||||||
siteKey: this.environmentService.get('CAPTCHA_SITE_KEY'),
|
siteKey: this.environmentService.get('CAPTCHA_SITE_KEY'),
|
||||||
},
|
},
|
||||||
chromeExtensionId: this.environmentService.get('CHROME_EXTENSION_ID'),
|
chromeExtensionId: this.environmentService.get('CHROME_EXTENSION_ID'),
|
||||||
|
api: {
|
||||||
|
mutationMaximumRecordAffected: this.environmentService.get(
|
||||||
|
'MUTATION_MAXIMUM_RECORD_AFFECTED',
|
||||||
|
),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
return Promise.resolve(clientConfig);
|
return Promise.resolve(clientConfig);
|
||||||
|
|||||||
Reference in New Issue
Block a user