drop nestjs-query IDField from standalone DTOs/entities (#22881)
## What Replaces `@IDField(() => UUIDScalarType)` from `@ptc-org/nestjs-query-graphql` with the native `@Field(() => UUIDScalarType)` (`@nestjs/graphql`) across 50 DTOs and entities that are **not** wired to a nestjs-query auto-resolver. This continues the incremental migration off `@ptc-org/nestjs-query`. ## Why These 50 types only used `IDField` to type their `id` column as a UUID scalar. Since none of them are attached to a `NestjsQueryGraphQLModule.forFeature` resolver, `IDField` carries no extra behavior here — it's a plain field decorator. Co-authored-by: Abdul Rahman <abdulrahmancodes@users.noreply.github.com>
This commit is contained in:
+1
-3
@@ -2,14 +2,12 @@
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { BillingProductDTO } from 'src/engine/core-modules/billing/dtos/billing-product.dto';
|
||||
|
||||
@ObjectType('BillingSubscriptionItem')
|
||||
export class BillingSubscriptionItemDTO {
|
||||
@IDField(() => UUIDScalarType)
|
||||
@Field(() => UUIDScalarType)
|
||||
id: string;
|
||||
|
||||
@Field(() => Boolean)
|
||||
|
||||
+1
-3
@@ -1,8 +1,6 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
@@ -25,7 +23,7 @@ import { WorkspaceRelatedEntity } from 'src/engine/workspace-manager/types/works
|
||||
unique: true,
|
||||
})
|
||||
export class BillingCustomerEntity extends WorkspaceRelatedEntity {
|
||||
@IDField(() => UUIDScalarType)
|
||||
@Field(() => UUIDScalarType)
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
|
||||
+1
-3
@@ -1,8 +1,6 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
@@ -27,7 +25,7 @@ import { WorkspaceRelatedEntity } from 'src/engine/workspace-manager/types/works
|
||||
'workspaceId',
|
||||
])
|
||||
export class BillingEntitlementEntity extends WorkspaceRelatedEntity {
|
||||
@IDField(() => UUIDScalarType)
|
||||
@Field(() => UUIDScalarType)
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
|
||||
+1
-3
@@ -1,8 +1,6 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
import graphqlTypeJson from 'graphql-type-json';
|
||||
import {
|
||||
Column,
|
||||
@@ -56,7 +54,7 @@ registerEnumType(SubscriptionInterval, { name: 'SubscriptionInterval' });
|
||||
})
|
||||
@ObjectType('BillingSubscription')
|
||||
export class BillingSubscriptionEntity extends WorkspaceRelatedEntity {
|
||||
@IDField(() => UUIDScalarType)
|
||||
@Field(() => UUIDScalarType)
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user