diff --git a/packages/twenty-front/src/modules/object-record/hooks/__tests__/useUpdateOneRecordMutation.test.tsx b/packages/twenty-front/src/modules/object-record/hooks/__tests__/useUpdateOneRecordMutation.test.tsx index 313ca054f391..69b69856d425 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/__tests__/useUpdateOneRecordMutation.test.tsx +++ b/packages/twenty-front/src/modules/object-record/hooks/__tests__/useUpdateOneRecordMutation.test.tsx @@ -5,7 +5,7 @@ import { RecoilRoot } from 'recoil'; import { useUpdateOneRecordMutation } from '@/object-record/hooks/useUpdateOneRecordMutation'; const expectedQueryTemplate = ` -mutation UpdateOnePerson($idToUpdate: UUID!, $input: PersonUpdateInput!) { +mutation UpdateOnePerson($idToUpdate: ID!, $input: PersonUpdateInput!) { updatePerson(id: $idToUpdate, data: $input) { __typename xLink { @@ -36,13 +36,11 @@ mutation UpdateOnePerson($idToUpdate: UUID!, $input: PersonUpdateInput!) { describe('useUpdateOneRecordMutation', () => { it('should return a valid createManyRecordsMutation', () => { const objectNameSingular = 'person'; - const depth = 2; const { result } = renderHook( () => useUpdateOneRecordMutation({ objectNameSingular, - depth, }), { wrapper: RecoilRoot, diff --git a/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/delete-query.factory.ts b/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/delete-query.factory.ts index e3fa74fa99fa..d1f0a497ee95 100644 --- a/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/delete-query.factory.ts +++ b/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/delete-query.factory.ts @@ -8,7 +8,7 @@ export class DeleteQueryFactory { const objectNameSingular = capitalize(objectMetadataItem.nameSingular); return ` - mutation Delete${objectNameSingular}($id: UUID!) { + mutation Delete${objectNameSingular}($id: ID!) { delete${objectNameSingular}(id: $id) { id } diff --git a/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/update-query.factory.ts b/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/update-query.factory.ts index e2be04b652e7..e289c94f2284 100644 --- a/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/update-query.factory.ts +++ b/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/update-query.factory.ts @@ -11,7 +11,7 @@ export class UpdateQueryFactory { return ` mutation Update${capitalize( objectNameSingular, - )}($id: UUID!, $data: ${capitalize(objectNameSingular)}UpdateInput!) { + )}($id: ID!, $data: ${capitalize(objectNameSingular)}UpdateInput!) { update${capitalize(objectNameSingular)}(id: $id, data: $data) { id ${objectMetadata.objectMetadataItem.fields diff --git a/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts b/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts index f5757dc36970..3c6ea223d4ff 100644 --- a/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts +++ b/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts @@ -181,7 +181,7 @@ export class ApiRestMetadataService { return ` query FindOne${capitalize(objectNameSingular)}( - $id: UUID!, + $id: ID!, ) { ${objectNameSingular}(id: $id) { id