No documentation on how to add pagination type
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.5k
- Forks
- 468
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 2
Description
Describe the bug
There is no way to integration a custom pagination type. You can add a custom resolver to add custom builder instance but cannot add a new pagination type. This is useful features as there are 1) multiple ways to do pagination 2) external factors that my required a custom or modified pagination type such as DB design, system architecture, etc.
Expected behavior/Solution
A way to integration a custom pagination type. I have added one by altering the source pagination files but that is not ideal. I believe requiring it to be an extension of a LengthAwarePagination type to be fair since it would only require adding the new type as an available type type and being able to call it as a method available on the builder.
Steps to reproduce
- Look at the documentation
- There is documentation on how to add a resolver but that does not return the pagination, only a pre modified Builder instance
Output/Logs
N/A
Lighthouse Version
v5.70.0
I have done this manually by modifying the following src/Pagniation files:
- PaginationType
- PaginationServiceProvider
- PaginationArgs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing resolver documentation and the src/Pagniation files named in the issue: PaginationType, PaginationServiceProvider, and PaginationArgs. Compare the documented custom-resolver path with the reporter’s manual changes. Done means a supported way to integrate a custom pagination type and document how to invoke it through the builder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, laravel, php
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100