graph-client: Auto Pagination broken

When trying to do a simple query a formatting error is returned. The query runs fine in the cloud & the error only occurs locally when the autoPagination transformation is included .graphclientrc.yml.

image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 17 (8 by maintainers)

Most upvoted comments

@Luiz-N Could you create a new issue with more specific scenario? @OlaStenberg Could you create a new issue with that reproduction and a description that says auto pagination transform breaks the query when there are other transforms like prefix? Thanks 😃

Hey,

I have two sources with prefixes and can’t get auto paginatino to work, am I missing something?

When running this query: https://codesandbox.io/s/sharp-faraday-3drfno?file=/kovan-legacy-exchange.graphql (first: 1000 works)

I get this error back: image

Would you like me to open up a new issue for this?

@ardatan I seem to be getting the skip limit issue again after trying to query for more than 5000 records… Not sure what has changed. Tested latest version 0.0.10 and the canary builds posted above. Am I messing something up?

Edit: @dotansimha Actually ignore that. it is working on the latest version. I just wasn’t building it locally first I think.

Edit2: Ok there is still a bug here with auto-pagination… but only when the first parameter is set between 5000-1000 (try 7000 or 8000). Above that it works.

As a sidenote. Is it possible to get aggregate counts without having to run the actual full query? The auto pagination is great but I have to guess an upper bound for the number of records to receive back in the first parameter.

It’s working! Here’s a query returning 1000 records. nice!

it seems to be working here. Could you help me to reproduce it? https://codesandbox.io/s/elastic-grothendieck-vt6qfh?file=/.graphclientrc.yml

I tested @graphprotocol/client-cli@0.0.9-canary-22437f0.0 and the ignored arguments issue is resolved but i’m still getting the same skip errors

Also I think the following version fixes the issue with exceeding skip limit;

@graphprotocol/client-cli@0.0.9-canary-22437f0.0

Contents of the.graphclientrc.yml file is below and that is the only transformation. I started with the nextjs example in this repo. Removing the autoPagination transformation allows the query to run successfully.

sources:
  - name: uniswap
    handler:
      graphql:
        endpoint: https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2
    transforms:
      - autoPagination:
          validateSchema: true

Sample query:

query MyQuery {
  uniswapDayDatas(first: 10) {
    dailyVolumeUSD
  }
}