-
Notifications
You must be signed in to change notification settings - Fork 44
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
Info received from hasNextPage is wrong in some resolvers #272
Comments
Which ORM are you using?
|
TypeORM & Postgre - Checked the executed SQL and as you mention If I set 373 It goes for |
Interesting, did you log the exact query TypeORM runs? (If you enable logging) And does that one return the correct results? |
Yes, I got two on the console, one for results and one |
Interesting, using bigints maybe? I also can't think about anything that could cause this. Think its also impossible to create a repo that reproduces this issue? The output between the version that works and that does not work is also exactly the same? Maybe log this within the typeorm adapter to be sure. |
Describe the bug
When fetching data through a resolver we have that connects to a table with 4k+ records, It returns the data correctly, but for some reason returns
hasNextPage: false
when fetching more than (oddly specific) 373 records. Any number before that works normally, but If we try to fetch 373, 500, 1000 etc, It will state there are no more next pages. This happens in a single resolver of all we have exposed, but It is built exactly as other.Have you read the Contributing Guidelines?
Yes
To Reproduce
Steps to reproduce the behavior:
paging: { first: ... }
with a number above 372.hasNextPage: false
even when the totalCount indicates the existence of more records.Expected behavior
The
hasNextPage
attribute should show astrue
Screenshots
Desktop (please complete the following information):
Additional context
If I connect to a copy of the DB which has 1.8k records fetched on that same resolver, It works just perfect, so we tried to check If this has something to do with the number of records. Tried with some resolvers connected to tables that have +10k records and they work fine. Also, when trying to fetch next page using endCursor, It correctly returns next page, but still states
hasNextPage
as false, only says It's true on previous to last page.The text was updated successfully, but these errors were encountered: