Rename mutation maximum affected records (#6042)

As per my last comment on https://github.com/twentyhq/twenty/pull/6039,
we decided to rename this var
This commit is contained in:
Weiko
2024-06-26 18:00:25 +02:00
committed by GitHub
parent 87abc1b31d
commit 1eb9c582f3
10 changed files with 26 additions and 13 deletions

View File

@ -70,6 +70,6 @@ SIGN_IN_PREFILLED=true
# CAPTCHA_SECRET_KEY=
# API_RATE_LIMITING_TTL=
# API_RATE_LIMITING_LIMIT=
# MUTATION_MAXIMUM_RECORD_AFFECTED=100
# MUTATION_MAXIMUM_AFFECTED_RECORDS=100
# CHROME_EXTENSION_ID=bggmipldbceihilonnbpgoeclgbkblkp
# PG_SSL_ALLOW_SELF_SIGNED=true

View File

@ -23,4 +23,4 @@ FILE_TOKEN_SECRET=secret_file_token
# MESSAGING_PROVIDER_GMAIL_ENABLED=false
# STORAGE_TYPE=local
# STORAGE_LOCAL_PATH=.local-storage
# MUTATION_MAXIMUM_RECORD_AFFECTED=100
# MUTATION_MAXIMUM_AFFECTED_RECORDS=100

View File

@ -432,7 +432,7 @@ export class WorkspaceQueryRunnerService {
args.filter?.id?.in?.forEach((id) => assertIsValidUuid(id));
const maximumRecordAffected = this.environmentService.get(
'MUTATION_MAXIMUM_RECORD_AFFECTED',
'MUTATION_MAXIMUM_AFFECTED_RECORDS',
);
const query = await this.workspaceQueryBuilderFactory.updateMany(args, {
...options,
@ -484,7 +484,7 @@ export class WorkspaceQueryRunnerService {
assertMutationNotOnRemoteObject(objectMetadataItem);
const maximumRecordAffected = this.environmentService.get(
'MUTATION_MAXIMUM_RECORD_AFFECTED',
'MUTATION_MAXIMUM_AFFECTED_RECORDS',
);
const query = await this.workspaceQueryBuilderFactory.deleteMany(args, {
...options,
@ -691,7 +691,7 @@ export class WorkspaceQueryRunnerService {
errors,
{
atMost: this.environmentService.get(
'MUTATION_MAXIMUM_RECORD_AFFECTED',
'MUTATION_MAXIMUM_AFFECTED_RECORDS',
),
} satisfies PgGraphQLConfig,
);

View File

@ -68,7 +68,7 @@ class Captcha {
@ObjectType()
class ApiConfig {
@Field(() => Number, { nullable: false })
mutationMaximumRecordAffected: number;
mutationMaximumAffectedRecords: number;
}
@ObjectType()

View File

@ -47,8 +47,8 @@ export class ClientConfigResolver {
},
chromeExtensionId: this.environmentService.get('CHROME_EXTENSION_ID'),
api: {
mutationMaximumRecordAffected: this.environmentService.get(
'MUTATION_MAXIMUM_RECORD_AFFECTED',
mutationMaximumAffectedRecords: this.environmentService.get(
'MUTATION_MAXIMUM_AFFECTED_RECORDS',
),
},
};

View File

@ -324,7 +324,7 @@ export class EnvironmentVariables {
@CastToPositiveNumber()
@IsOptional()
@IsNumber()
MUTATION_MAXIMUM_RECORD_AFFECTED = 100;
MUTATION_MAXIMUM_AFFECTED_RECORDS = 100;
REDIS_HOST = '127.0.0.1';