2. What is the schema registry?
2m

♻️ Schema evolution

Our app, along with our , is intended to evolve over time as we add new features and improve our codebase. To support this healthy evolution, we can use the Apollo schema registry.

🤔 What is the schema registry?

At its core, the is a version control system for our . It stores our 's change history, tracking the types and s that were added, modified, and removed. The powers almost every Apollo feature.

Illustration showing the registry and its version control similarities

Similar to how we commit and push changes to our codebase to a Git repository, we should push every new version of our to the . Apollo Server can do that for us automatically on startup, or we can include it as a step in our CI/CD process.

Illustration showing the how new versions of the schema should be pushed to the registry
In which ways the Apollo schema registry is comparable to a Git version control system?

Thanks to the , we can track variants of the same graph that are deployed in different environments, such as staging and production. We can run to detect when a potential change might break one of our clients. We can also use the on a production graph without relying on , so our graph's structure is kept private from unauthorized clients.

Illustration showing the schema registry's features

As our graph grows, multiple teams might even want to break parts of it into separate subgraphs that they manage independently. The can take care of tracking all those subgraphs, enabling Apollo to surface potential conflicts between them, and even powering composition with Apollo managed federation!

Note: Want to learn more? When you're done with this course, check out our Voyage series, which goes into more detail about Apollo Federation.

Illustration showing the schema registry's federation features
Which of these features are powered by the schema registry?

So many cool and powerful features come with the ! We'll focus on only a couple for this course: storing change history for a single graph and usage.

Previous
Next

Share your questions and comments about this lesson

Your feedback helps us improve! If you're stuck or confused, let us know and we'll help you out. All comments are public and must follow the Apollo Code of Conduct. Note that comments that have been resolved or addressed may be removed.

You'll need a GitHub account to post below. Don't have one? Post in our Odyssey forum instead.