Moprh-integration-delete (#13165)

Intergartion test dedicated to the delete method
This commit is contained in:
Guillim
2025-07-15 11:16:19 +02:00
committed by GitHub
parent ff3f3d4661
commit 1a81e43286
5 changed files with 222 additions and 40 deletions

View File

@ -4,7 +4,9 @@ import { FieldMetadataType } from 'twenty-shared/types';
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
export const createRelationBetweenObjects = async ({
export const createRelationBetweenObjects = async <
T extends FieldMetadataType.RELATION | FieldMetadataType.MORPH_RELATION,
>({
objectMetadataId,
targetObjectMetadataId,
type,
@ -17,7 +19,7 @@ export const createRelationBetweenObjects = async ({
}: {
objectMetadataId: string;
targetObjectMetadataId: string;
type: FieldMetadataType.RELATION | FieldMetadataType.MORPH_RELATION;
type: T;
relationType: RelationType;
name?: string;
label?: string;