Skip to content

The open alternative to Salesforce, designed for AI.

Fix wrong uuid error on field metadata (#18598)

Charles Bochetab13020e2b22
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index 42988367a6b..787ee1644de 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -1770,7 +1770,7 @@ export type Field = {
settings?: Maybe<Scalars['JSON']>;
standardOverrides?: Maybe<StandardOverrides>;
type: FieldMetadataType;
- universalIdentifier: Scalars['UUID'];
+ universalIdentifier: Scalars['String'];
updatedAt: Scalars['DateTime'];
};
@@ -1803,7 +1803,6 @@ export type FieldFilter = {
isSystem?: InputMaybe<BooleanFieldComparison>;
isUIReadOnly?: InputMaybe<BooleanFieldComparison>;
or?: InputMaybe<Array<FieldFilter>>;
- universalIdentifier?: InputMaybe<UuidFilterComparison>;
};
/** Type of the field */
@@ -4992,7 +4991,7 @@ export type UpdateFieldInput = {
name?: InputMaybe<Scalars['String']>;
options?: InputMaybe<Scalars['JSON']>;
settings?: InputMaybe<Scalars['JSON']>;
- universalIdentifier?: InputMaybe<Scalars['UUID']>;
+ universalIdentifier?: InputMaybe<Scalars['String']>;
};
export type UpdateFrontComponentInput = {
diff --git a/packages/twenty-sdk/src/clients/generated/metadata/schema.graphql b/packages/twenty-sdk/src/clients/generated/metadata/schema.graphql
index 9c105b42e15..6010a889b29 100644
--- a/packages/twenty-sdk/src/clients/generated/metadata/schema.graphql
+++ b/packages/twenty-sdk/src/clients/generated/metadata/schema.graphql
@@ -326,7 +326,7 @@ type StandardOverrides {
type Field {
id: UUID!
- universalIdentifier: UUID!
+ universalIdentifier: String!
type: FieldMetadataType!
name: String!
label: String!
@@ -534,7 +534,6 @@ input FieldFilter {
and: [FieldFilter!]
or: [FieldFilter!]
id: UUIDFilterComparison
- universalIdentifier: UUIDFilterComparison
isCustom: BooleanFieldComparison
isActive: BooleanFieldComparison
isSystem: BooleanFieldComparison
@@ -4004,7 +4003,7 @@ input UpdateOneFieldMetadataInput {
}
input UpdateFieldInput {
- universalIdentifier: UUID
+ universalIdentifier: String
name: String
label: String
description: String
diff --git a/packages/twenty-sdk/src/clients/generated/metadata/schema.ts b/packages/twenty-sdk/src/clients/generated/metadata/schema.ts
index aa40ba4a917..701e5d9348d 100644
--- a/packages/twenty-sdk/src/clients/generated/metadata/schema.ts
+++ b/packages/twenty-sdk/src/clients/generated/metadata/schema.ts
@@ -280,7 +280,7 @@ export interface StandardOverrides {
export interface Field {
id: Scalars['UUID']
- universalIdentifier: Scalars['UUID']
+ universalIdentifier: Scalars['String']
type: FieldMetadataType
name: Scalars['String']
label: Scalars['String']
@@ -3253,7 +3253,7 @@ export interface ObjectGenqlSelection{
__scalar?: boolean | number
}
-export interface FieldFilter {and?: (FieldFilter[] | null),or?: (FieldFilter[] | null),id?: (UUIDFilterComparison | null),universalIdentifier?: (UUIDFilterComparison | null),isCustom?: (BooleanFieldComparison | null),isActive?: (BooleanFieldComparison | null),isSystem?: (BooleanFieldComparison | null),isUIReadOnly?: (BooleanFieldComparison | null)}
+export interface FieldFilter {and?: (FieldFilter[] | null),or?: (FieldFilter[] | null),id?: (UUIDFilterComparison | null),isCustom?: (BooleanFieldComparison | null),isActive?: (BooleanFieldComparison | null),isSystem?: (BooleanFieldComparison | null),isUIReadOnly?: (BooleanFieldComparison | null)}
export interface IndexFilter {and?: (IndexFilter[] | null),or?: (IndexFilter[] | null),id?: (UUIDFilterComparison | null),isCustom?: (BooleanFieldComparison | null)}
@@ -6124,7 +6124,7 @@ id: Scalars['UUID'],
/** The record to update */
update: UpdateFieldInput}
-export interface UpdateFieldInput {universalIdentifier?: (Scalars['UUID'] | null),name?: (Scalars['String'] | null),label?: (Scalars['String'] | null),description?: (Scalars['String'] | null),icon?: (Scalars['String'] | null),isActive?: (Scalars['Boolean'] | null),isSystem?: (Scalars['Boolean'] | null),isUIReadOnly?: (Scalars['Boolean'] | null),isNullable?: (Scalars['Boolean'] | null),isUnique?: (Scalars['Boolean'] | null),defaultValue?: (Scalars['JSON'] | null),options?: (Scalars['JSON'] | null),settings?: (Scalars['JSON'] | null),isLabelSyncedWithName?: (Scalars['Boolean'] | null),morphRelationsUpdatePayload?: (Scalars['JSON'][] | null)}
+export interface UpdateFieldInput {universalIdentifier?: (Scalars['String'] | null),name?: (Scalars['String'] | null),label?: (Scalars['String'] | null),description?: (Scalars['String'] | null),icon?: (Scalars['String'] | null),isActive?: (Scalars['Boolean'] | null),isSystem?: (Scalars['Boolean'] | null),isUIReadOnly?: (Scalars['Boolean'] | null),isNullable?: (Scalars['Boolean'] | null),isUnique?: (Scalars['Boolean'] | null),defaultValue?: (Scalars['JSON'] | null),options?: (Scalars['JSON'] | null),settings?: (Scalars['JSON'] | null),isLabelSyncedWithName?: (Scalars['Boolean'] | null),morphRelationsUpdatePayload?: (Scalars['JSON'][] | null)}
export interface DeleteOneFieldInput {
/** The id of the field to delete. */
diff --git a/packages/twenty-sdk/src/clients/generated/metadata/types.ts b/packages/twenty-sdk/src/clients/generated/metadata/types.ts
index dbe38b39fd2..a5f31fcef5f 100644
--- a/packages/twenty-sdk/src/clients/generated/metadata/types.ts
+++ b/packages/twenty-sdk/src/clients/generated/metadata/types.ts
@@ -716,7 +716,7 @@ export default {
3
],
"universalIdentifier": [
- 3
+ 1
],
"type": [
35
@@ -1132,9 +1132,6 @@ export default {
"id": [
42
],
- "universalIdentifier": [
- 42
- ],
"isCustom": [
43
],
@@ -10154,7 +10151,7 @@ export default {
},
"UpdateFieldInput": {
"universalIdentifier": [
- 3
+ 1
],
"name": [
1
diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts
index 7f9c6c0b527..b2c778b4ec5 100644
--- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts
@@ -64,9 +64,8 @@ export class FieldMetadataDTO<T extends FieldMetadataType = FieldMetadataType> {
@IDField(() => UUIDScalarType)
id: string;
- @IsUUID()
@IsNotEmpty()
- @IDField(() => UUIDScalarType)
+ @Field()
universalIdentifier: string;
@IsEnum(FieldMetadataType)