Skip to content

Saving nextTokens on cache for paginated queries #179

@rromany

Description

@rromany

State your question
We are using AppSync in an android app installed on devices that can be offline frequently. Some queries have large numbers of itemes, therefore we are paging them in graphql / dynamodb.

Due to the above,the QUERY_ROOT are beginning to accumulate "NextTokens" , making the record in SQLITE table very heavy, which has given us some problems. We would appreciate some guidance on how to solve this problem, We tried AWSAppSyncClient.builder().resolver(new CacheKeyResolver() {/implemented methods/}), but the QUERY_ROOT has no changed.

Provide code snippets (if applicable)

Environment(please complete the following information):

  • AppSync SDK Version: v2.7.7, v2.8.2, v2.8.3 (in the last version the nexttoken are also saved in QUERY_ROOT, but as we started to test it recently we have not overfilled the record yet)

Device Information (please complete the following information):

  • Device: simulator

  • Android Version: 8.1.0

  • Specific to simulators:
    *720x1280 hdpi
    *512mb ram
    *80 vm heap
    *1gb internal storage
    *graphics automatic

  • Device: generic android pos 1

  • Android Version: 6.0.1

  • Device: generic android pos 2

  • Android Version: 8.1.0

  • Device: HUAWEI MATE 20 LITE

  • Android Version: 8.1.0

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions