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 } } }

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠