1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
I was able to get it to work by setting the value of $ctx.result.items to $publicRecords
The issue was caused by the structure of the result output. Do note that this response template is one of the example templates in the AppSync resolver UI, so it should probably be corrected.
#set($publicRecords = [])
#foreach($item in $ctx.result.items)
#if($item.public == true)
#set($added = $publicRecords.add($item))
#end
#end
#set($ctx.result.items = $publicRecords)
$utils.toJson($ctx.result)
Edited by: raz92 on Jun 26, 2019 4:42 PM
répondu il y a 5 ans
Contenus pertinents
- Réponse acceptéedemandé il y a un an
- demandé il y a un an
- demandé il y a 7 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 10 mois