aws / aws-appsync-community

The AWS AppSync community
https://aws.amazon.com/appsync
Apache License 2.0
506 stars 32 forks source link

How can I pass a next token to a sync query? #269

Closed LeoReubelt closed 1 year ago

LeoReubelt commented 1 year ago

I am using a sync query like below.

query MyQuery {
  syncObjects(limit: 10, nextToken: "123", lastSync: 1111) {
    items {
      _deleted
      id
    }
    startedAt
    nextToken
  }
}

If I have a nextToken from a previous call, I pass it along with my last sync value. It works without the next token, but when an next token is passed I get the following error...

Error: The supplied Item contains a null AttributeValue (Service: DynamoDb, Status Code: 400.

I have the same problem if I use the AppSync Console, so it is not anything in my project. So what do I do if I make a sync query and get back a next token?