Codementor Events

How AppSync supercharges my workflow

Published Sep 03, 2020
How AppSync supercharges my workflow

About me

I'm a freelance software developer. My go-to toolkit is AWS Amplify, and everything it contains, one of which is AWS AppSync.

Why I wanted to learn AWS AppSync

A few years ago I was hesitant to make the dive from REST APIs to GraphQL. I wasn't sure I bought into the advantages, and knew they came with challenges that would take away from time to deliver awesome products and ultimately, would add up the hours I'd be juggling tabs of Stack Overflow, AWS Docs, and reference code just to do things that used to be effortless. I think at it's core- I loved AppSync because of how easy it was to build APIs when you can drive the whole process from simply writing a robust schema, and pressing 'deploy'.

How I approached learning AWS AppSync

The game changer was once I got the hang of writing a bullet-proof schema. To be honest, I got there through a lot of trial and error. I started with simple schemas, and over time would add more models, and more connections. Eventually, one-to-many would become many-to-many, with their own complications when it comes to performance and security. I can't stress enough how much is really just trial and error. Of course- a lot of reading the docs too.

Challenges I faced

I hit a few challenges along the way. The biggest was dealing with AppSync authorization for large, complex schemas. Once a schema starts to have a few many-to-many connections with non-trivial security requirements, the Amplify/AppSync provided directives and transformers start to become less useful. Don't get me wrong, they are great for all the basic requirements, but they start to fall short when it comes to controlling read/write permissions on deeply nested shareable user data.

Key takeaways

AppSync is awesome. 19 times out of 20 it's my go-to infrastructure for new APIs- unless they have some very specific requirements. The only trick is not biting off more than you can chew as far as security requirements. You will probably want to spin up a test project or two with Amplify before using it in a production setting, since it has some powerful interactions between different AWS resources, namely Cognito, AppSync and DynamoDB.

Tips and advice

Dive in! head over to AWS Amplify's documentation site, pick your web/mobile stack of choice and start building something. It will likely feel very similar to what you're used to, and then when you'd normally have to stop and shift gears to set up backend infrastructure, with Amplify- you don't really have to. It feels a lot like an extension of the front end development workflow. That's a big part of why I love it.

Final thoughts and next steps

It took me a long time to learn AppSync inside and out. It really is a game changer for rapid development of full-stack applications. You can use for web, mobile or whatever else you can dream up. For now I'm going to continue building powerful apps on top of it, and continue to help others learned what I have so they can as well.

Discover and read more posts from Ross Ragsdale
get started
post commentsBe the first to share your opinion
Show more replies