{"version":"1.0","type":"rich","title":"A Generic Paginated Type for GraphQL in NestJS code first approach","description":"This example demonstrates a generic paginated type for GraphQL APIs using a NestJS code-first approach. It shows how to define reusable interfaces and classes for cursor-based pagination, including edge, page info, and paginated response structures. The code uses `@ObjectType`, `@Field`, and `@ArgsType` decorators from `@nestjs/graphql`, along with `class-validator` decorators like `@IsBase64` and `@Max` for input validation. A `PaginationService` handles encoding and decoding cursors with Buffer base64 conversion and implements the pagination logic for entity arrays.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-8d2da947f872c1430753a752155e166e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}