1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
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
beantwortet vor 5 Jahren
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr