"After" argument for pagination behaving weirdly

So yesterday I was implementing pagination using “After” argument: question (after: 0xdb3dca4908049bad, first: 5) . There were 8-9 questions in the db. I had set the limit for first to 5.

For first webpage load, first five records came correctly. Then I was sending 5th question’s “uid” to fetch next 5 records, but I was getting this response :

  "code": "ErrorInvalidRequest", 
  "message": "strconv.ParseInt: parsing \\\"0xdb3dca4908049bad\\\": value out of range"}"

I could not figure out what’s wrong, then I dumped all the records and inserted 8-9 questions again. And it worked correctly, pagination was working, I thought it must be something related to old db. The only problem then was, if there was no records remaining to fetch then it gives above response. So it should give correct response if there are no more data to fetch, instead of giving error in response.

Then today, to recheck if everything works, I deleted db again and inserted 7 records, first 5 fetch correctly, but it was again giving same error response for fetching next records.

So it is behaving weirdly. Need to test it properly for finding the cause. Don’t have anything to reproduce it, sometime it works sometime it does not.

1 Like

I think @ashwin95r fixed this. If it’s not released in the current version, you might want to build Dgraph from head. @ashwin95r, can you help @Rahul-Sagore with this?

Sure, will give him a binary from an appropriate commit.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.