diff --git a/src/develop/graphql-pagination.md b/src/develop/graphql-pagination.md index 651dadd1f..79a2a8c07 100644 --- a/src/develop/graphql-pagination.md +++ b/src/develop/graphql-pagination.md @@ -8,6 +8,8 @@ While it might seem more convenient and simple, this is a sub-optimal practice. [GraphQL Blockchain API](https://docs.evercloud.dev/reference/graphql-api/blockchain) was developed for this exact reason - to provide a reliable way of blockchain data pagination and prevent any potential data inconsistencies regardless of network load. +**Note**: With [GraphQL API 1.0](https://docs.evercloud.dev/reference/breaking-changes/migration-guides/graphql-api-1.0-migration) update by default Blockchain API provides only data for the past 7 days. For use cases where earlier data is needed make sure to use the 'archive: true' flag in blockchain query filters, as shown in the samples below. Do not however use it, if archive data isn't required, as it will generate unnecessary load. + **Note**: Query Collections are a supported instrument and will remain so. However, they are intended and optimized primarily for tasks that are not critically dependent on data completeness, such as analytics. ## Blocks Pagination with Blockchain API @@ -28,6 +30,7 @@ query { end: 2670661 } workchain: 0 + archive: true ) { edges { node { @@ -115,6 +118,7 @@ query { after: "52899360053806ff11d" first: 10 workchain: 0 + archive: true ) { edges { node { @@ -205,6 +209,7 @@ query { end: 2670661 } workchain: 0 + archive: true ) { edges { node { @@ -278,6 +283,7 @@ query { after: "528be5b005381da811c00" first: 10 workchain: 0 + archive: true ) { edges { node { diff --git a/src/develop/recipes/backend-integration.md b/src/develop/recipes/backend-integration.md index 002635912..6218bc934 100644 --- a/src/develop/recipes/backend-integration.md +++ b/src/develop/recipes/backend-integration.md @@ -580,6 +580,8 @@ In these samples JS SDK is used. [Bindings](https://docs.everos.dev/ever-sdk/#co The [pagination](https://github.com/tonlabs/sdk-samples/tree/master/demo/paginate-transactions) sample queries and displays transactions in workchain 0 (workchain where simple transfers happen, -1 workchain is masterchain where you can find service transactions and validator transactions) from the beginning. We can get all the transaction and filter by account addresses on the backend side. +**Note**: By default the Blockchain API queries, such as the one used here provide only data from the past 7 days. To retrieve older data, make sure to use the `archive: true` flag, as shown in the sample: + ```typescript async function main(client: TonClient) { // In this example, we want the query to return 2 items per page. @@ -595,6 +597,7 @@ The [pagination](https://github.com/tonlabs/sdk-samples/tree/master/demo/paginat blockchain { transactions( workchain: 0 + archive: true first: $count after: $cursor ) {