Open Angus-Walsh opened 1 year ago
We have been using #return in VLC, and I have been looking for this functionality. Documentation mentions nothing about it!
As we are porting our VLC to APPSYNC_JS I really hope that it is a possibility, in certain circumstances I have to use "cheap calls" to the DB just to get by a unneeded pipeline function 👎
Hope this issue will be prioritised, JavaScript resolvers is really a great leap forward ❤️
posted a proposal here https://github.com/aws/aws-appsync-community/issues/147 please comment.
:+1: This is really needed
This is really needed. like nikolajwestergaard just returning some cheap operation.
We now support early return to skip data source request in a function or resolver. See details: https://docs.aws.amazon.com/appsync/latest/devguide/runtime-utils-js.html
Hi @onlybakam
Does that e.g. runtime.earlyReturn
also work with VTL pipeline? Many thanks.
We now support early return to skip data source request in a function or resolver. See details: https://docs.aws.amazon.com/appsync/latest/devguide/runtime-utils-js.html
This seems to only skip the current function execution. It will NOT stop a pipeline from executing the next function. Are there any plans for introducing a method for returning early from the entire pipeline?
Hello @onlybakam Is there any functionality similar to runtime.earlyReturn but for resolvers in VTL? ?
We now support early return to skip data source request in a function or resolver. See details: https://docs.aws.amazon.com/appsync/latest/devguide/runtime-utils-js.html
This seems to only skip the current function execution. It will NOT stop a pipeline from executing the next function. Are there any plans for introducing a method for returning early from the entire pipeline?
I just tested this and it works, thank you!
Greetings!
I Have been experimenting with the Javascript resolver functions and pipelines, and I was wondering if there was a way to:
As an example, the first resolver function in the pipeline queries a DynamoDB. I then have the following resolver function that creates a new entry if nothing was found by the previous function.
Is it possible in this sort of a situation to "pass through" this resolver, or even return early from the pipeline?
I have seen that in VTL there is the concept of
#return
which looks like what I need but I can't find an equivalent for JS (I could also be misunderstanding#return
as I am not that familiar with VTL).