Using AWS AppSync, Graphql and DynamoDB
The following query is causing me an issue.
eventId is an optional field. When running the below query, records with the optional eventId field trigger an error. I would expect eventId to be null, if the resolver could not execute.. However the below message is triggered.
How would this be resolved?
query listTickets {
listTickets {
items {
id,
eventId {
id,
}
}
}
}
"message": "The provided key element does not match the schema (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException; Request ID: FTFDINCA42EALGI59I2VGH07G7VV4KQNSO5AEMVJF66Q9ASUAAJG)"
{
"version": "2017-02-28",
"operation": "GetItem",
"key": {
"id": $util.dynamodb.toDynamoDBJson($ctx.args.eventId),
}
}