1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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
respondido hace 5 años
Contenido relevante
- OFICIAL DE AWSActualizada hace un año