Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built-in pagination for making it easier to deal with graph-node limitations? #38

Closed
dotansimha opened this issue Apr 12, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@dotansimha
Copy link
Collaborator

The goal of this idea is to have an option to allow users to fetch more than the limit of graph-node, without being concerned about orchestrating calls.

Today, the limit is 1000 records per page.

For example, if a user needs to have more than 1000 (for example 5000), they should be able to specify it in their GraphQL request, and then graph-client can orchestrate the 5 calls to get the list of data, and then merge it into a single response.

@dotansimha dotansimha added the enhancement New feature or request label Apr 12, 2022
@dotansimha
Copy link
Collaborator Author

@ardatan let's explore this option to have an Executor that is aware of this feature? :)

@schmidsi
Copy link
Member

Important here is that the recommended approach of paginating through a bigger data set is using the ..._gt filters on numerical attributes like block number or timestamp. Instead of using the first:, skip: arguments.

@dotansimha
Copy link
Collaborator Author

dotansimha commented Apr 25, 2022

Important here is that the recommended approach of paginating through a bigger data set is using the ..._gt filters on numerical attributes like block number or timestamp. Instead of using the first:, skip: arguments.

Interesting, thanks @schmidsi ! I created a separate issue for that: #48 (since it's a different flow for fetching more data, that happens serially and cannot run concurrently like page-based pagination)

@dotansimha
Copy link
Collaborator Author

This is now available in @graphprotocol/client-cli@0.0.5, docs: https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants