question: im running an aws lambda function after ...
# prisma-whats-new
e
question: im running an aws lambda function after creating an entity in graph.cool, i want to wait for the aws lambda function to complete, how do i do so?
create entity -> aws lambda runs -> aws lambda complete -> create success currently faulty workflow is: create entity -> aws lambda runs -> create success -> aws lambda completes
p
I assume you would have to “create success” from within the lambda function, i.e. send a mutation back to graph.cool as the last thing in your lambda handler code.
e
im looking for a synchronous, clean way of solving this, from searching throug the documentation, as of now I dont think its possible?
h
What @philippbosch proposes is the only way to achieve this right now. It is kind of redundant but remains clean if you handle the states of your nodes properly. You can declare an ENUM for different status and let your lambda function mutate the status to DONE when it completes