Bi-directional Pagination in GraphQL doesn't work as expected
Summary
When paginating GraphQL results without typical pagination, the hasNextPage
and hasPreviousPage
booleans don't work as expected.
When going forward, hasNextPage
will always be correct, but hasPreviousPage
will always be false
When going back, hasPreviousPage
will always be correct, but hasNextPage
will always be false
I made a quick video to help demonstrate this behaviour:
https://www.youtube.com/watch?v=oPf-_gFeBlo
This is probably related to an issue created in the relay project in 2016
There's also the issue of not being able to select a specific page, but that's outside the scope of this one.
Steps to reproduce
The example above uses vulnerabilities which aren't on the main codebase, but the sam behaviour should exist for anything that exposes pageInfo
. I'm pretty sure designs
has this issue too.