April 15, 2022

Introducing the Apollo Federation Best Practices Series

Michael Watson

Michael Watson

Building a graph can feel daunting, regardless of whether you’re working on a new project or a large enterprise trying to bring it all together. Bringing everything into one graph brings up various questions: What APIs are made available for clients? How many services do existing clients talk to? How are these services related?

Apollo Federation provides the possibility of solving these concerns through a domain-oriented graph, which allows you to elevate your graph from just another API to a platform that exposes the value of your product.

Apollo Federation provides a developer-friendly path to GraphQL microservices for any project, whether you’re a single developer or a large organization. Since its inception, I’ve been helping customers with Apollo Federation, and that’s why I’ve started the Apollo Federation best practices series. To help you overcome the most common challenges devs face when designing, building, and scaling federation in the wild.

Our Advice

At the heart of Apollo Federation is a thin open-sourced specification that makes it possible to modularize your graph into smaller parts using entities and subgraphs. Linking subgraphs together using the @key directive, we compose them into a supergraph. We believe the supergraph provides a new strategic advantage for devs building with GraphQL, but first, we should discuss the questions that lead us to this conclusion. 

What is a supergraph? What is the architectural difference between a monolith and a supergraph? Why would we want to break down our current monolithic architecture? What are the advantages of a supergraph? How is designing a federated schema different from a single schema? What about deploying a federated graph and proper security for my subgraphs?

This series is a curation of our advice on why you should embrace a distributed architecture and how you can be successful with Apollo Federation.

Where should I start?

If you’re rusty or unfamiliar with GraphQL, I’d recommend first walking through the getting started guide for Apollo Server and taking the Lift-off course in Odyssey.

After that, check out the posts from the series in order.

Start reading

  1. Introduction to Apollo Federation
  2. Federation schema design principles

Written by

Michael Watson

Michael Watson

Read more by Michael Watson