Make id available in remote table output (#5003)
Wrongly use `PrimaryGeneratedColumn` typeOrm decorator instead of the nest query one. Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
import { ObjectType, Field, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
import { IsEnum } from 'class-validator';
|
||||
import { PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
|
||||
export enum RemoteTableStatus {
|
||||
SYNCED = 'SYNCED',
|
||||
@ -15,8 +17,8 @@ registerEnumType(RemoteTableStatus, {
|
||||
|
||||
@ObjectType('RemoteTable')
|
||||
export class RemoteTableDTO {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
@IDField(() => UUIDScalarType, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => String)
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user