graphprotocol / support

Community support for the Hosted Service of The Graph
https://thegraph.com/
10 stars 3 forks source link

Unable to input skip value greater than 50000 in thegraph queries #67

Closed rshah-deqode closed 3 years ago

rshah-deqode commented 3 years ago

While using UniswapV2 graph, I ran the following query

{
  uniswapFactories(first: 1000,skip:51000) {
    id
    pairCount
    totalVolumeUSD
  }
}

and got this error response

{
  "errors": [
    {
      "message": "Value of \"skip\" must be greater than 0"
    }
  ]
}

It is not accepting skip value greater than 50000, even if it is 50001 it is throwing the same error, this was not an issue previously because I was able to run above query but now I started facing this issue.

Also I tried this many other graphs also and found same issue with them.

Is there any changes made to thegraph backend that is causing this issue ?

lutter commented 3 years ago

Yes, we had to restrict skip since we were seeing an increasing number of queries that try to download collections using first/skip which for large skip values is very expensive. The recommended way for retrieving large numbers of entities is documented here (search for large number of entities)