If you're like most developers, you want to make changes to your supergraph safely, confidently and quickly.
In this tutorial, we're going to dive into the world of GraphOS and how it helps us achieve those goals using schema checks, launches and supergraph analytics. We'll walk through a scenario of deprecating a field in our supergraph. We'll use a tool called Rover to locally run schema checks and publish to our schema registry, then integrate these actions into our CI/CD process. By the end of the tutorial, you'll be set up with a workflow that lets you evolve your supergraph and deploy changes with ease.
Let's get started!
You'll need to have:
- A GitHub account and a code editor (we use VS Code), if you want to follow along with the course project.
You'll need to know:
- GraphQL basics (working with a schema, writing resolvers)
- Working with the terminal (navigating directories, running commands)
- Git basics (commiting changes, pushing to a remote repository)
The supergraph and GraphOS
If you're not familiar with these terms, here's a quick recap!
The supergraph unifies your app's data, services, and capabilities. The supergraph powers client app experiences, leveraging the GraphQL language to give clients exactly what they ask for, from one single endpoint. The supergraph is made up of a router and one or more subgraphs.
Apollo GraphOS is a complete cloud platform for building, managing, and scaling a supergraph. GraphOS provides a set of tools and services so that product developers can focus on building better apps, faster. In this course, we're going to focus on one key feature of GraphOS: safe schema delivery.
For more details on how a supergraph works to respond to client queries, check out the second lesson of the "GraphOS: Basics" course.
Our API so far
Poetic Plates 🍽️, is the GraphQL API for adventurous cooks and foodies! Right now, it provides AI-generated recipes with poetic instructions and delicious (or disastrous) results. With extremely detailed and sometimes helpful instructions, cooking has never been more fun!
In the "GraphOS: Basics" course, we transformed Poetic Plates into a supergraph, ready to be used by our API consumers. Since then, we've gotten some traffic from a variety of places: curious chefs using the public variant to send queries using Explorer, app developers poking around to build their next project.
We've heard plenty of feedback so far, and we're going to take the first step to tackling one of them. In this tutorial, we're going to walk through how to deprecate an existing field in our schema and replace it with a new one.
- The supergraph unifies your app's data, services and capabilities.
- Apollo GraphOS helps you build, manage and scale your supergraph.
- This course will cover schema checks, launches and supergraph analytics to help us make changes to our supergraph safely and confidently.
Let's set up all that we need to make schema changes happen. We'll need the right repositories, deploy to production, and have our cloud supergraph ready in GraphOS.
Share your questions and comments about this lesson
This course is currently in
You'll need a GitHub account to post below. Don't have one? Post in our Odyssey forum instead.