AWS AppSync directives - AWS AppSync

AWS AppSync directives

AWS AppSync exposes directives to facilitate developer productivity when writing Velocity.

#return(Object) The #return directive comes handy if you need to return prematurely from any mapping template. #return is analogous to the return keyword in programming languages, as it will return from the closest scoped block of logic. What this means is using #return inside a resolver mapping template will return from the resolver. Additionally, using #return from a function mapping template will return from the function and will continue the execution to either the next function in the pipeline or the resolver response mapping template.

#return Same as #return(Object) but null will be returned instead.