Skip to content

Windowed Pagination Plugin #333

Answered by hayes
rogerballard asked this question in Q&A
Feb 24, 2022 · 4 comments · 10 replies
Discussion options

You must be logged in to vote

@rogerballard Created a working example for you: https://github.com/hayes/pothos/blob/main/examples/relay-windowed-pagination/src/schema.ts#L141-L148

Pagination is something that isn't standardized enough to write a plugin that doesn't feel overly opinionated. Relay cursor pagination has a specification that I can follow, but there are too many open questions for windowed pagination.

I think an approach like the one in the above example is simple enough to implement while letting users customize the exact format of their pagination types as needed.

Let me know if this works for you, happy to discuss further if you have other ideas on how this should be handled.

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hayes
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@hayes
Comment options

@arimgibson
Comment options

@hayes
Comment options

@arimgibson
Comment options

@arimgibson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #332 on February 24, 2022 19:23.