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:
19
packages/hoppscotch-backend/src/types/input-types.args.ts
Normal file
19
packages/hoppscotch-backend/src/types/input-types.args.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user