Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward pagination is always false on hasPreviousPage #23

Closed
jor3l opened this issue Feb 5, 2022 · 2 comments
Closed

Forward pagination is always false on hasPreviousPage #23

jor3l opened this issue Feb 5, 2022 · 2 comments

Comments

@jor3l
Copy link

jor3l commented Feb 5, 2022

When doing connectionFromArraySlice and the args are only first and after this line will always be false since $after is null, even tho, there are previous pages.

'hasPreviousPage' => $last !== null ? $startOffset > $lowerBound : false,

see: forward pagination on relay
also probably the same when doing a backwards pagination.

So am I doing something wrong here?

@jor3l jor3l changed the title Forward pagination always has false for previous page Forward pagination is always false on hasPreviousPage Feb 5, 2022
@jor3l
Copy link
Author

jor3l commented Feb 5, 2022

Looked at the tests and they also expect hasPreviousPage to be false which is incorrect.

@jor3l
Copy link
Author

jor3l commented Feb 7, 2022

Closing this, see here for more info on this issue: graphql/graphql-relay-js#58

@jor3l jor3l closed this as completed Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant