awslabs / awslabs/aws-mobile-appsync-sdk-android
How to use getStore().write() when using jobconnection with token?
- Dominant language
- Java
- Stars
- 106
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
**State your question**
Updating this query cache is simple (I'm using tutorial source code):
```
Query listPostsQuery = ListPostsQuery.builder().build();
List items = new ArrayList<>();
items.addAll(allPosts.values());
ListPostsQuery.Data data = new ListPostsQuery.Data(items);
ClientFactory.getInstance(display.getApplicationContext()).getStore()
.write(listPostsQuery, data).enqueue(null);
```
How to build query builder when using pagination (*Connection) in schema? Query builder has limit and next token fields. When I provide limit and random token, the next query will return nothing.
Maybe second question? - I also have to provide exactly same limit for writing to cache builder as one in the query to get any results. Is it intended behavior?
Contributor guide
Research direction
The issue provides no source files or tests to inspect. Start by reproducing the tutorial cache write with a paginated Connection query, including different limits and tokens, then trace the generated query builder and cache behavior. Done means determining whether the behavior is expected and documenting or correcting the usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, graphql, java
- Domain
- api, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100