{"id":28714363,"url":"https://github.com/graphql-compose/graphql-compose-pagination","last_synced_at":"2025-07-06T15:37:22.341Z","repository":{"id":23680748,"uuid":"99588277","full_name":"graphql-compose/graphql-compose-pagination","owner":"graphql-compose","description":"Plugin for TypeComposer (graphql-compose), that adds `pagination` resolver. ","archived":false,"fork":false,"pushed_at":"2023-01-07T04:04:47.000Z","size":1809,"stargazers_count":29,"open_issues_count":19,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T14:40:51.618Z","etag":null,"topics":["graphql","graphql-compose","graphql-compose-plugin","pagination"],"latest_commit_sha":null,"homepage":"https://github.com/nodkz/graphql-compose","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphql-compose.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-07T14:43:33.000Z","updated_at":"2021-12-27T17:28:44.000Z","dependencies_parsed_at":"2023-01-14T10:00:32.541Z","dependency_job_id":null,"html_url":"https://github.com/graphql-compose/graphql-compose-pagination","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/graphql-compose/graphql-compose-pagination","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-compose%2Fgraphql-compose-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-compose%2Fgraphql-compose-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-compose%2Fgraphql-compose-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-compose%2Fgraphql-compose-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphql-compose","download_url":"https://codeload.github.com/graphql-compose/graphql-compose-pagination/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-compose%2Fgraphql-compose-pagination/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259906124,"owners_count":22929973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","graphql-compose","graphql-compose-plugin","pagination"],"created_at":"2025-06-15T01:07:01.535Z","updated_at":"2025-06-15T01:07:02.268Z","avatar_url":"https://github.com/graphql-compose.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-compose-pagination\n\n[![travis build](https://img.shields.io/travis/graphql-compose/graphql-compose-pagination.svg)](https://travis-ci.org/graphql-compose/graphql-compose-pagination)\n[![codecov coverage](https://img.shields.io/codecov/c/github/graphql-compose/graphql-compose-pagination.svg)](https://codecov.io/github/graphql-compose/graphql-compose-pagination)\n[![npm](https://img.shields.io/npm/v/graphql-compose-pagination.svg)](https://www.npmjs.com/package/graphql-compose-pagination)\n[![trend](https://img.shields.io/npm/dt/graphql-compose-pagination.svg)](http://www.npmtrends.com/graphql-compose-pagination)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\nThis is a plugin for [graphql-compose](https://github.com/graphql-compose/graphql-compose) family, which adds to the ObjectTypeComposer `pagination` resolver.\n\nLive demo: [https://graphql-compose.herokuapp.com/](https://graphql-compose.herokuapp.com/)\n\n[CHANGELOG](https://github.com/graphql-compose/graphql-compose-pagination/blob/master/CHANGELOG.md)\n\n## Installation\n\n```bash\nnpm install graphql graphql-compose graphql-compose-pagination --save\n```\n\nModules `graphql` and `graphql-compose` are in `peerDependencies`, so should be installed explicitly in your app. They should not installed as sub-modules, cause internally checks the classes instances.\n\n## Example\n\n```js\nimport { preparePaginationResolver } from 'graphql-compose-pagination';\nimport { UserTC, findManyResolver, countResolver } from './user';\n\nconst paginationResolver = preparePaginationResolver(UserTC, {\n  findManyResolver,\n  countResolver,\n  name: 'pagination', // Default\n  perPage: 20, // Default\n});\n```\n\nImplementation of `findManyResolver` and `countResolver` can be found in [this file](./src/__mocks__/User.ts).\n\n\u003cimg width=\"832\" alt=\"screen shot 2017-08-07 at 23 31 46\" src=\"https://user-images.githubusercontent.com/1946920/29038210-ad2390e4-7bc8-11e7-8143-ff0cca2b39cc.png\"\u003e\n\n## Used in plugins\n\n[graphql-compose-mongoose](https://github.com/graphql-compose/graphql-compose-mongoose) – converts mongoose models to graphql types\n\n## License\n\n[MIT](https://github.com/graphql-compose/graphql-compose-pagination/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-compose%2Fgraphql-compose-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphql-compose%2Fgraphql-compose-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-compose%2Fgraphql-compose-pagination/lists"}