Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created November 29, 2018 00:11
Show Gist options
  • Save adrianhall/5e4e1ef43893c76e5ef1e0b7ea62ce1f to your computer and use it in GitHub Desktop.
Save adrianhall/5e4e1ef43893c76e5ef1e0b7ea62ce1f to your computer and use it in GitHub Desktop.
## Raise a GraphQL field error in case of a datasource invocation error
#if($ctx.error)
$util.error($ctx.error.message, $ctx.error.type)
#end
## Pass back the result from DynamoDB. **
$util.toJson($context.prev.result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment