Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use AppSync and Amazon RDS with serverless-graphql

There is this great repository with example implementations of different serverless scenarios.

Right now I'm struggling with the combination of AppSync and Amazon RDS. I tried the implementation of the standalone rds, and the appsync examples provided in the repository. These are working like a charm. But obviously there are many differences and difficulties if you'd like to combine these technologies. I used the schema, resolver and handler functions from the rds directory and combined it with the appsync lambda implementation. I adjusted the mapping templates and updated the serverless.yml file.

I could successfully deploy the whole appsync service and all resources without any errors. I'm able to access the graphql endpoint from graphiql and do my queries. But when I try it from the appsync console I get null as a response. I guess it has something to do with the mapping templates, but I'm not quite sure.

Has anybody got any suggestions or maybe a working example of this specific combination?

like image 444
widdy Avatar asked Jan 29 '23 05:01

widdy


1 Answers

I finally could figure out a working implementation for this specific setup which I want to share with all of you. Check out my serverless-graphql-appsync-rds repository on GitHub and leave me some feedback! Note that this repository contains just the source code without any explanations. I'll create a better documentation in the near future.

like image 112
widdy Avatar answered Jan 30 '23 19:01

widdy