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,4 +1,4 @@
import { Field, ID, ObjectType } from '@nestjs/graphql';
import { Field, ObjectType } from '@nestjs/graphql';
import {
Entity,
@ -14,6 +14,7 @@ import { BeforeCreateOne, IDField } from '@ptc-org/nestjs-query-graphql';
import { BeforeCreateOneAppToken } from 'src/engine/core-modules/app-token/hooks/before-create-one-app-token.hook';
import { User } from 'src/engine/core-modules/user/user.entity';
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
export enum AppTokenType {
RefreshToken = 'REFRESH_TOKEN',
CodeChallenge = 'CODE_CHALLENGE',
@ -24,7 +25,7 @@ export enum AppTokenType {
@ObjectType('AppToken')
@BeforeCreateOne(BeforeCreateOneAppToken)
export class AppToken {
@IDField(() => ID)
@IDField(() => UUIDScalarType)
@PrimaryGeneratedColumn('uuid')
id: string;