Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Pagination issue #44

Open
danielObon opened this issue Jan 18, 2022 · 7 comments
Open

Pagination issue #44

danielObon opened this issue Jan 18, 2022 · 7 comments

Comments

@danielObon
Copy link

Hi, using the following query/body on postman I can fetch 100 axies ordered by id starting from the n'th, this seems to work perfectly for smaller values, and "total" shows over 10 million items, but for some reason after the 10k mark I start seeing an empty result, is this a bug or am I missing something ?

method: POST
query: https://graphql-gateway.axieinfinity.com/graphql
body (raw, json):
{ "operationName": "GetAxieBriefList", "variables": { "from": n, "size": 100, "sort": "IdAsc", "auctionType": "All" }, "query": "query GetAxieBriefList($auctionType: AuctionType, $criteria: AxieSearchCriteria, $from: Int, $sort: SortBy, $size: Int, $owner: String) {\n axies(auctionType: $auctionType, criteria: $criteria, from: $from, sort: $sort, size: $size, owner: $owner) {\n total\n results {\n ...AxieBrief\n }\n }\n}\n\nfragment AxieBrief on Axie {\n id\n name \n}\n" }

result for n === 10000:
{ "data": { "axies": { "total": 0, "results": [] } } }

@danielObon
Copy link
Author

danielObon commented Jan 18, 2022

this might not be only an issue with the graphql endpoint:

https://marketplace.axieinfinity.com/axie/?page=417&sort=IdAsc&auctionTypes=Sale
(there are 24 axies per page, 417*24 is arround the 10k mark)

Screen Shot 2022-01-18 at 10 47 45

@moises0108
Copy link

hi, do you find a form to take all the axies for price asc?

@danielObon
Copy link
Author

I'm not sure what you mean, but the issue is the same when ordering by price

@fzn0x
Copy link

fzn0x commented Jan 26, 2022

I'm not sure what you mean, but the issue is the same when ordering by price

He means "Getting all the 10 million data in a row", is it possible?

@moises0108
Copy link

yep, thats it, i think the problem is the api, when i try to get more than 6k the api just send me a 502 error, i try tu put a sleep but is the same.

@danielObon
Copy link
Author

danielObon commented Jan 26, 2022

I'm not sure what you mean, but the issue is the same when ordering by price

He means "Getting all the 10 million data in a row", is it possible?

I doubt it, it's not a very good practice to return unpaginated data, especially when you have that many items, the call would probably time-out.
also, that is unrelated to the bug, you should open a new issue.

@moises0108
Copy link

ohh srry now is when i understand what you post, i think you try to get more than 10k,but i re-read, i try what u say(in python) and have the same error, 502 bad gateway, when i put from 10k, that is why i cant pull more than 10k axies.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants