Image for post
Image for post

Why Federation

In this series of blog posts we share Moonpig’s journey to start using GraphQL. In part 1 we talked about why we decided to use GraphQL. Part 2 covered our experiences of the schema stitching paradigm. This part will explain our next steps as we venture into the world of GraphQL ‘Apollo Federation’.

The schema stitching gateway that we built using Apollo Server and graphql-tools was holding up well in production; a significant proportion of our website traffic was being served by our stitched GraphQL API with multiple micrographs and no major concerns. But… a requirement came in from our engineers building the basket API. They wanted to define a type in the schema which has fields resolved by more than one micrograph. With our schema stitching gateway this would not be possible unless we allowed schema-specific resolver logic to be added to the gateway; something that we had decided against to avoid having everyone write and deploy code from the same source repositories. …


Glen Thomas

Senior Engineer at Moonpig

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store