graph-client icon indicating copy to clipboard operation
graph-client copied to clipboard

[Bug] autoPagination limited at 6000 entities

Open spennyp opened this issue 2 years ago • 1 comments

I have having some problems with the autoPagination feature. It seems I am unable to get more than 6000 items due to:

message: The skip argument must be between 0 and 5000, but is 6000

I followed the docs from here:

  • https://thegraph.com/docs/en/querying/querying-from-an-application/#graphql-clients
  • https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md

My .graphclientrc.yml is:

sources:
    - name: test
      handler:
          graphql:
              endpoint: https://api.thegraph.com/subgraphs/name/papercliplabs/compound-v3-mainnet
      transforms:
          - autoPagination:
                validateSchema: true 

documents:
    - ./test.graphql

My test.graphql is:

query TestQuery {
    transactions(first: 10000) {
        id
    }
}

And I am executing the query like so:

import { execute, TestQueryDocument } from "./.graphclient";

const result = await execute(TestQueryDocument, {});
console.log(result);

Looks like others are having the same issue

This is not really "Unlimited Pagination" as the docs say, so seems there is a bug here. If this skip of 5000 is a limitation in the graph node, the client can still filter by ID and serve more than 6000

spennyp avatar Oct 26 '23 19:10 spennyp