Parallelise Development by Using Mock Resolvers With AppSync
An API-first approach using GraphQL with AppSync
Here’s a technique I've successfully used with teams when building functionalities that require both backend and frontend development.
I call it mocks resolvers. The idea is stupidly simple, but it has the potential to unblock and parallelise separate streams of development, thus reducing unnecessary blockers and dependencies.
In a nutshell, the mock resolvers technique requires that the team’s first task be to design any GraphQL statements (queries, mutations, etc) needed to build a feature. Immediately after that, a hardcoded set of responses is attached to each query, so that all GraphQL operations are able to receive and respond with the appropriate payload.
At this point, a contract of sorts is established. The frontend team can proceed to build the interface that’s going to use those GraphQL operations, whereas the backend team can focus on building the business logic that will eventually be invoked by AppSync.
Keep reading with a 7-day free trial
Subscribe to The Serverless Mindset to keep reading this post and get 7 days of free access to the full post archives.