awslabs / aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Apache License 2.0
921 stars 266 forks source link

Unreliable responses #555

Closed jesper-bylund closed 4 years ago

jesper-bylund commented 4 years ago

Do you want to request a feature or report a bug? BUG

What is the current behavior? My most basic filtered query sometimes returns data, sometimes returns empty.

query findDateTing {
  listTings(limit:50, filter: { createdAt: {eq: "2020-04-24T22:00:00.000Z"}}) {
    items {
      id
      createdAt
      content
    }
  }
}

Limit is set to 50, because at less than 10 it never returns data, no idea why. Tested this over 20 times.

What is the expected behavior? That I get back the right data, every time.

What versions I can do this locally using Apollo. Or in the AWS appsync console. The result is the same.

jesper-bylund commented 4 years ago

After some digging around I find out that "limit" is used BEFORE filter. Which means it's the opposite of how it works in SQL/mongo etc.

So limit should always be set to max, or a million or something like that.