I'm currently working with AWS AppSync and found a web tutorial. (Link: https://www.youtube.com/watch?v=0Xbt7VqkJNc)
All in all, it's a nice example for beginners but I have some problems with creating the demonstrated mutation/query of the tutorial.
The issue is that it's not possible to set an individual ID number (for example "12345") because the output is always an auto-generated ID number. Is there an option to change the config in DynamoDB or is this problem connected with resolvers in AWS AppSync?
Code example:
mutation createTodo {
createTodo(input: {
name:"Get milk",
completed: false
}) {
id}
}
query getTodo {
getTodo(id: "afda5d05-bad0-4436-9f8b-76e92d1228c3" ) {
id name completed} }
Output:
{
"data": {
"getTodo": {
"id": "afda5d05-bad0-4436-9f8b-76e92d1228c3",
"name": "Get milk",
"completed": false
}
}
}