Fix ID type being used in place of UUID in graphql and metadata queries (#4905)

We have recently discovered that we were using ID type in place of UUID
type in many place in the code.
We have merged #4895 but this introduced bugs as we forgot to replace it
everywhere
This commit is contained in:
Charles Bochet
2024-04-10 11:33:17 +02:00
committed by GitHub
parent 4f2c29dce0
commit f1cc1c60e0
43 changed files with 235 additions and 225 deletions

View File

@ -1,11 +1,13 @@
import { ObjectType, Field, ID } from '@nestjs/graphql';
import { ObjectType, Field } from '@nestjs/graphql';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
@ObjectType('TimelineCalendarEventParticipant')
export class TimelineCalendarEventParticipant {
@Field(() => ID, { nullable: true })
@Field(() => UUIDScalarType, { nullable: true })
personId: string;
@Field(() => ID, { nullable: true })
@Field(() => UUIDScalarType, { nullable: true })
workspaceMemberId: string;
@Field()

View File

@ -1,5 +1,6 @@
import { ObjectType, ID, Field, registerEnumType } from '@nestjs/graphql';
import { ObjectType, Field, registerEnumType } from '@nestjs/graphql';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
import { TimelineCalendarEventParticipant } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto';
export enum TimelineCalendarEventVisibility {
@ -23,7 +24,7 @@ export class LinkMetadata {
@ObjectType('TimelineCalendarEvent')
export class TimelineCalendarEvent {
@Field(() => ID)
@Field(() => UUIDScalarType)
id: string;
@Field()

View File

@ -1,13 +1,5 @@
import { UseGuards } from '@nestjs/common';
import {
Query,
Args,
ArgsType,
Field,
ID,
Int,
Resolver,
} from '@nestjs/graphql';
import { Query, Args, ArgsType, Field, Int, Resolver } from '@nestjs/graphql';
import { Max } from 'class-validator';
@ -21,10 +13,11 @@ import { TimelineCalendarEventService } from 'src/engine/core-modules/calendar/t
import { UserService } from 'src/engine/core-modules/user/services/user.service';
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
import { NotFoundError } from 'src/engine/utils/graphql-errors.util';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
@ArgsType()
class GetTimelineCalendarEventsFromPersonIdArgs {
@Field(() => ID)
@Field(() => UUIDScalarType)
personId: string;
@Field(() => Int)
@ -37,7 +30,7 @@ class GetTimelineCalendarEventsFromPersonIdArgs {
@ArgsType()
class GetTimelineCalendarEventsFromCompanyIdArgs {
@Field(() => ID)
@Field(() => UUIDScalarType)
companyId: string;
@Field(() => Int)