2. What is the schema registry?
2m

♻️ Schema evolution

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

🤔 What is the schema registry?

At its core, the schema registry is a version control system for our schema. It stores our schema's change history, tracking the types and that were added, modified, and removed. The registry 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 schema to the registry. 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 schema registry, we can track of the same 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 Explorer 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 grows, multiple teams might even want to break parts of it into separate that they manage independently. The schema registry can take care of tracking all those subgraphs, enabling Apollo to surface potential conflicts between them, and even powering schema with Apollo !

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

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 schema registry! We'll focus on only a couple for this course: storing schema change history for a single and usage.

Previous

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.