threshold-network / merkle-distribution

Threshold Network rewards generation and distribution
https://threshold.network
1 stars 6 forks source link

Add pagination to subgraph queries #28

Closed manumonti closed 1 year ago

manumonti commented 2 years ago

Note: this PR must be merged after #31

Since there is a 1000 elements limit per entity to data retrieved by a subgraph GraphQL query, if in any moment any query reach this limit, elements exceeding this limit will be missed, and the calculation of rewards for merkle distribution will not be correct.

The proposed solution here is to retrieves all the elements in batchs of 1000 elements.

This PR solves #23