HBE-155 Common input-args for Pagination (#19)

* feat: common input-args added

* chore: move common input-types.args.ts into types folder

* fix: add gql InputType annotation

* docs: update field description
This commit is contained in:
Mir Arif Hasan
2023-02-16 11:58:07 +06:00
committed by GitHub
parent b60d45ba76
commit 24dd535d9e

View File

@@ -0,0 +1,19 @@
import { ArgsType, Field, InputType } from '@nestjs/graphql';
@ArgsType()
@InputType()
export class PaginationArgs {
@Field({
nullable: true,
defaultValue: undefined,
description: 'Cursor for pagination, ID of the last item in the list',
})
cursor: string;
@Field({
nullable: true,
defaultValue: 10,
description: 'Number of items to fetch',
})
take: number;
}