0

Anyone successfully integrated AWS AppSync with Laravel?

I am new to AWS AppSync but good experience with laravel.

I am trying to implement an offline-app feature in my mobile app and the mobile API part is what Laravel handles.

I looked into AWS AppSync but all they are talking about is dynamoDB and graphQL. Someplace it says i need to use AWS Lambda.

I really can't get a grip on how to properly implement this.

Any suggestions or pieces of advice are greatly appreciated.

I have basic experience with graphQL

Thanks

I checked a few video sessions and found HTTP endpoint can be used as a resolver. is this the proper way?

If I use HTTP as resolver can I still use the real-time features?

links

https://aws.amazon.com/appsync/

Rameez Rami
  • 5,322
  • 2
  • 29
  • 36

1 Answers1

0

Laravel is a PHP framework, so I think the two options you would want to consider would be HTTP and Lambda data sources.

Lambda can be something of a catch-all for data sources: you have absolute control over what you call, how you do it, and in what language you do it. You just have to set up a Lambda function and create a data source in the AppSync console pointing to it, then have your Lambda function interact with your framework however it needs to.

I'm not terribly familiar with Laravel myself, but I believe HTTP is also a totally viable option. I would think this would be the way you want to go, as it cuts out the added complexity and latency of a Lambda function between AppSync and your end destination. A tutorial for setting one up is available here: https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-http-resolvers.html

In either case, real time updates will be absolutely available to you.

Jeff Bailey
  • 5,655
  • 1
  • 22
  • 30
  • I have set up an IOS app with DataSource as "HTTP endpoint". I can fetch all users and auto store in mysqli DB and this data is available offline. i have also tried the subscriptions to mutations which also works fine. Now my confusion is how do I sync the data. suppose I have 10 rows and there is 2 new row available when I was offline. how do I know these are available? – Rameez Rami Apr 16 '19 at 11:38
  • i have posted a new question for above comment https://stackoverflow.com/questions/55708113/how-to-handle-data-offline-sync-with-aws-appsync you can answer there. – Rameez Rami Apr 16 '19 at 12:25