Skip to content

Commit

Permalink
Update post-order.input.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
cha2hyun authored Nov 17, 2023
1 parent ba67287 commit f62c0b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/posts/dto/post-order.input.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InputType, registerEnumType } from '@nestjs/graphql';
import { Field, InputType, registerEnumType } from '@nestjs/graphql';
import { Order } from '../../common/order/order';

export enum PostOrderField {
Expand All @@ -16,6 +16,7 @@ registerEnumType(PostOrderField, {
});

@InputType()
export class PostOrder extends Order {
export class PostOrder extends Order {
@Field(() => PostOrderField)
field: PostOrderField;
}

1 comment on commit f62c0b2

@cha2hyun
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If field is not a @field
it will make an error with orderBy variables

Please sign in to comment.