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 個回答
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 } } }

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南