Amplify AppSync provides a way to execute a delete operation for a single item stored in DynamoDB. But what is the best way to delete all items that matches a value in a certain field?
Based on my initial searches, here’s what I found:
- Create a resolver, perform a BatchWrite Operation in DynamoDB but this can only delete up to 25 items max.
My GraphQL entities are ChatRoom and Messages. Messages for a ChatRoom could be more than thousands thus making the solution above seems inefficient.