Custom Resolver - Unsupported operation 'BatchDeleteItem'/'BatchPutItem'
See original GitHub issueHi,
I’ve written a custom resolver with BatchPutItem
and BatchDeleteItem
. Everytime I run a mutation with this resolver I get
{
"data": {
"batchDeleteBusinessList": null
},
"errors": [
{
"path": [
"batchDeleteBusinessList"
],
"data": null,
"errorType": "MappingTemplate",
"errorInfo": null,
"locations": [
{
"line": 38,
"column": 3,
"sourceName": null
}
],
"message": "Unsupported operation 'BatchDeleteItem'."
}
]
}
or "message": "Unsupported operation 'BatchPutItem'."
- req
#set($ids = [])
#foreach($id in ${ctx.args.input})
#set($pkey = {})
$util.qr($pkey.put("id", $util.dynamodb.toString($id)))
$util.qr($ids.add($pkey))
#end
{
"version": "2018-05-29",
"operation": "BatchDeleteItem",
"tables": {
"BusinessList-dzqohgcrhvhptkhcfvrvlkxdsy-dev": $utils.toJson($ids)
}
}
- Mutation.batchDelete.res.vtl.
#if ($ctx.error)
$util.appendError($ctx.error.message, $ctx.error.type)
#end
$util.toJson($ctx.result.data["BusinessList-dzqohgcrhvhptkhcfvrvlkxdsy-dev"])
- Mutation.batchDelete.res.vtl
batchDeleteBusinessList(input: [
"c279aa14-0f68-4a26-a18f-bb854cb185c9",
"8465e9f1-765c-43a6-9b19-a6b73b7fb762"
]) {
id
}
Any ideas?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
AWS Amplify Custom Resolver - Unsupported operation ...
I'm following some guides to implement a custom resolver with BatchPutItem operation. Currently I'm facing some issues which I can't get ...
Read more >How to Fix the Unsupported Operation Exception in Java
UnsupportedOperationException is a Java runtime exception that occurs when an unsupported operation is requested but could not be performed.
Read more >Java List UnsupportedOperationException | Baeldung
UnsupportedOperationException. A frequent way in which this error occurs is when we use asList() method from java.util.Arrays: public static ...
Read more >API (GraphQL) - Overwrite & customize resolvers - Amplify Docs
Resolvers are the mechanism by which requests are fulfilled. Learn how to overwrite or add custom resolvers with Amplify. - AWS Amplify Docs....
Read more >Unsupported Operation Exception when Starting WebSphere ...
ConfigServiceImpl.resolve(ConfigServiceImpl.java:837) at com.ibm.bcg.server.admin.EnvironmentUtility.initialize(EnvironmentUtility.java:99) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can check if this is enabled by checking your
transformer.conf.json
if it contains a ResolverConfig set up. I was able to get this working on a project that does not have conflict detection enabled and I was able to reproduce this issue on a project with this enabled.To clarify why this might be related is because using Batch Operations with Conflict Detection is not supported. Read more here: https://docs.aws.amazon.com/appsync/latest/devguide/conflict-detection-and-sync.html
Should conflict detection not be enabled and you are still running into this Unsupported Operation Issue please comment below.
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.