In this workshop, you'll learn how to take your GraphQL API to the next level. We'll take an existing GraphQL API and transform it into a supergraph that's ready to grow and evolve.
What you'll learn:
- Getting started with a supergraph using the GraphOS cloud-hosted router
- Using schema checks to make changes safely and confidently
- Integrating checks and publishing in local development and CI/CD pipeline
- Analyzing and improving supergraph metrics
- Adding new features using subgraphs and entities
⚠️ Before the workshop...
Helpful links
📖 How to use this companion course
You can use this course as a reference throughout the workshop. Here you'll find instructions, code snippets and exercise solutions that we'll be going through in the workshop.
Follow-along: Lessons starting with Follow-along
are designed for you to follow along with the instructor! Do what they're doing, but on your own machines.
Exercise: Lessons starting with Exercise
are designed to be an individual exercise for you to try your best to solve on your own! If you need help, you can pair with someone beside you, flag down a mentor or consult the solution in that same lesson.
What we're building
Introducing Poetic Plates 🍽️, the GraphQL API for adventurous cooks and foodies!
Poetic Plates lets you try your hand at AI-generated recipes with poetic instructions and delicious (or potentially disastrous) results. With extremely detailed and sometimes helpful instructions, cooking has never been more fun!
Right now, the API is simply a small collection of recipes. We can do things like:
- ask it for a random recipe
- ask it for the full list of recipes in its database
- ask it for the most recently added recipes
- see a recipe's ingredients, cooking time, instructions, and more
We've got big plans for Poetic Plates! We can see a future where users can add their own recipes, create collections, and share their thoughts. We could provide more details about each ingredient, or recommend specific recipes based on what's already in their pantry. The possibilities are endless!
While we're working on these new features and growing our schema, we also want to keep our current functionality up and running smoothly. We want to track the health of our API, and monitor things like which fields aren't being used, what are the most requested operations, or which parts of a query are way too slow. What's causing problems for the clients using it? Where can we improve?
GraphOS helps us solve these problems and more.
Workshop goals
Throughout this workshop, we'll build our understanding of GraphOS and how it supports our goal of scaling a GraphQL API.
By the end of our time together, you'll be able to:
- Use GraphOS metrics to identify the most frequently queried fields and top operations
- Develop a process for safe schema delivery with checks and launches
- Introduce new features to an existing supergraph
- Implement a federated architecture in future projects
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.