Reputation: 1414
Unfortunately, have come up short reading through both the AWS documentation and various posts on the internet.
I have a very simple schema. A single table for Person including their Name and Email address. I would like to get 5 random results in my app and believe the best way to do this is with resolvers (adding a random number and choosing the top 5 sorted by this).
However, I cannot seem to understand how to add a Lamda resolver? Is there a simple tutorial that guides how to do this?
Upvotes: 0
Views: 628
Reputation: 6158
Thank you for your interest in AWS AppSync. You can create a Lambda datasource by providing your Lambda function arn and then attach a resolver on any field on your schema using that datasource.
There is a tutorial you can follow using Lambda resolvers https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html
Upvotes: 1