Overview
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!
Pre-requisites
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)
We'll be working with JavaScript to make changes to our subgraph server, but you will not need extensive knowledge to follow along with the course project.
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 "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.
Key takeaways
- 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.
Up next
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
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.