Appsync GraphQL query does not return all DynamoDB rows?

0

I have a DynamoDB table and I noticed I was getting inconsistent results (in my web app) as I added more data to the table. I added 200 test rows to the table. The data includes a date.

I entered 4 rows for a specific date. I can use the DynamoDB console to filter these items and see the 4 records that match the date as expected.

When I issue a GraphQL query in the Appsync console filtered on the same date, I only get 2 items returned.

Hopefully, these images show both the DynamoDB and the Appsync consoles

DynamoDB

Appsync Console

Any ideas?

Thanks Kevin

1 Answer
1

I can see that there are default limits applied to the query as it is performing a scan.

Details are provided here: https://aws.amazon.com/premiumsupport/knowledge-center/appsync-wrong-query-item-number-dynamodb/

I updated the Appsync console query to include an updated limit and this now works fine.

query MyQuery { listActivities(limit: 1000, filter: {date: {eq: "2023-02-25T13:45+00:00"}}) { items { date owner } } }

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions