Created
December 20, 2020 16:07
-
-
Save bboure/a4cd25732fd89ba76662077ff5b181c3 to your computer and use it in GitHub Desktop.
appsync-long-cache-demo-response-template.vtl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if($ctx.result.statusCode == 200) | |
#set($body = $utils.parseJson($ctx.result.body)) | |
#foreach ($page in $body.query.pages.entrySet()) | |
#if ($page.value.title == $ctx.args.title) | |
#return($page.value.extract) | |
#end | |
#end | |
$utils.error("Article not found", "NotFound") | |
#else | |
$utils.error($ctx.result.statusCode, "Error") | |
#end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment