Follow me here, or on Twitter @jmagnuss as I plan to document the journey from architecture to implementation of this new mobile bank on AWS…
We’re using GraphQL, and leveraging the Apollo project’s server and client platform to rapidly prototype and deploy a Node GraphQL server. Apollo has been fantastic, I’ll post separately about the technical decisions that led us through a few options to land on Apollo, and why it’s the best choice for a secure, flexible GraphQL implementation that lets our developers move rapidly.
Apollo Server Plugins
Here’s the Apollo Server documentation on Plugins…
I wasn’t able to find a simple example of a Typescript plugin class, so I’ve written a working one here that you can copy and paste to fill in the methods you need.
Apollo exposes a base interface, ApolloServerPlugin that handles two triggers, but the requestDidStart callback also returns a GraphQLRequestListener that handles another seven triggers. I’ve combined both into a single class, with typing, and shown logging to output the important context data at each lifecycle stage.
Copy it, use it, and ping me if you find it valuable!
If you want to see how the full Apollo Server Idempotency plugin ends up, follow me here and on twitter…
I’m working with a team to build a new mobile bank for unbanked female entrepreneurs, and busy building towards a proof-of-concept to prove out the technology decisions as we move towards a pilot later in 2020.