Skip to content

Can we use IN operator in appsync javascript resolver for Query operation ?

0

I am trying to query dynamodb data using IN operator in appsync javascript resolver but getting error as invalid operator IN in keyConditionExpression.

1 Answer
1

AWS AppSync does not support the IN operator in the keyConditionExpression for DynamoDB queries, limiting the ability to query based on multiple values directly. Workarounds include using multiple equality conditions in the keyConditionExpression, performing filtering in the resolver code, or considering alternative DynamoDB operations like Scan for more complex filtering needs.

Custom resolvers with AWS Lambda can also be utilized for more intricate logic beyond AppSync's built-in capabilities.

AWS
EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

AWS
EXPERT

reviewed 2 years ago

EXPERT

reviewed 2 years ago

  • when using equality condidtion in expression getting error as expected JSON but got array

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.