Fix one to many relation and multi select fields on table (#14576)
Fixes: - relation one to many cannot be set (we have deprecated limit: keyword in graphql at it was not use, we should only use first or last) - https://github.com/twentyhq/twenty/issues/14556
This commit is contained in:
+18
-3
@@ -127,9 +127,14 @@ export class ObjectMetadataCreateGqlInputTypeGenerator {
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const modifiedEnumType = this.typeMapperService.applyTypeOptions(
|
||||
enumType,
|
||||
typeOptions,
|
||||
);
|
||||
|
||||
return {
|
||||
[fieldMetadata.name]: {
|
||||
type: enumType,
|
||||
type: modifiedEnumType,
|
||||
description: fieldMetadata.description,
|
||||
},
|
||||
};
|
||||
@@ -156,9 +161,14 @@ export class ObjectMetadataCreateGqlInputTypeGenerator {
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const modifiedCompositeType = this.typeMapperService.applyTypeOptions(
|
||||
compositeType,
|
||||
typeOptions,
|
||||
);
|
||||
|
||||
return {
|
||||
[fieldMetadata.name]: {
|
||||
type: compositeType,
|
||||
type: modifiedCompositeType,
|
||||
description: fieldMetadata.description,
|
||||
},
|
||||
};
|
||||
@@ -183,9 +193,14 @@ export class ObjectMetadataCreateGqlInputTypeGenerator {
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const modifiedType = this.typeMapperService.applyTypeOptions(
|
||||
type,
|
||||
typeOptions,
|
||||
);
|
||||
|
||||
return {
|
||||
[fieldMetadata.name]: {
|
||||
type,
|
||||
type: modifiedType,
|
||||
description: fieldMetadata.description,
|
||||
},
|
||||
};
|
||||
|
||||
+7
-1
@@ -142,9 +142,15 @@ export class ObjectMetadataUpdateGqlInputTypeGenerator {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
|
||||
const modifiedType = this.typeMapperService.applyTypeOptions(
|
||||
type,
|
||||
typeOptions,
|
||||
);
|
||||
|
||||
generatedFields = {
|
||||
[fieldMetadata.name]: {
|
||||
type,
|
||||
type: modifiedType,
|
||||
description: fieldMetadata.description,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user