@graphprotocol/client-auto-pagination
TypeScript icon, indicating that this package has built-in type declarations

2.0.7 • Public • Published

Automatic Unlimited Pagination

graph-client implements automatic pagination using first: and after: filters of graph-node.

At the moment, graph-node allow fetching only 1000 records per query. This transfomer allow you to run queries with any limit, and the breaks it automatically to multiple concurrent requests, then merges the responses into a single response.

This feature is implemented in @graphprotocol/client-auto-pagination and installed automatically with the graph-client CLI package.

Usage Example

# .graphclientrc.yml
sources:
  - name: uniswap
    handler:
      graphql:
        endpoint: https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2
    transforms:
      - autoPagination:
          validateSchema: true # Validates that the schema source actually contains the required input filters.
          limitOfRecords: 1000 # Default is 1000, you can change if you indexer has different configuration in GRAPH_GRAPHQL_MAX_FIRST var.

Readme

Keywords

Package Sidebar

Install

npm i @graphprotocol/client-auto-pagination

Weekly Downloads

3,081

Version

2.0.7

License

MIT

Unpacked Size

29.4 kB

Total Files

7

Last publish

Collaborators

  • a3k5
  • dwerner-en
  • mitchhs12
  • andras_en
  • migueldeelias
  • saihaj
  • pcarranzav_edgeandnode
  • edge-and-node
  • lnsd
  • neysofu
  • tmigone
  • dotansimha
  • nasmr
  • benface
  • jannispohlmann
  • fordn
  • lutter
  • zerim
  • martintel
  • abarmat
  • jcarpanelli
  • juanmardefago
  • dnfodjo
  • theodus
  • iain_mccown
  • cmwhited
  • adam-en
  • schmidsi