Explore Apollo Federation and supergraph architecture in this beginner-friendly workshop. Learn to modularize your GraphQL backend by creating and using entities, publishing subgraph schemas, and leveraging tools like Rover CLI. Gain hands-on experience with federated architecture, entity creation, and subgraph interaction.
What you'll learn
- The federated architecture of a supergraph (subgraphs and the router)
- Create and publish subgraph schemas
- Use the Rover CLI to interact with your supergraph
- Create and use entities between subgraphs
Who this workshop is for
- API developers with a basic understanding of GraphQL, such as building queries and working with a schema, but not familiar with GraphQL Federation.
Workshop resources
⚠️ Before the workshop...
If you have any questions or run into any issues with the workshop prep below, scroll to the end of this page to leave a comment or send us an email at summit@apollographql.com. We're here to help!
You will need the following:
You will also need:
Clone the repo locally
Clone the repo.
git clone https://github.com/apollographql-education/summit24-federation-entities.gitOpen it up in your code editor.
📂 summit24-federation-entities┣ 📂 subgraph-locations┣ 📂 subgraph-reviews┣ 📄 README.md┣ 📄 router-config.yaml┗ 📄 supergraph.yaml
Install dependencies in each subgraph server
In a new terminal window, navigate to the
subgraph-locations
directory.Install the dependencies.
subgraph-locationsnpm iRun the server in dev mode. Saving files will trigger the server to restart.
subgraph-locationsnpm run devIn another terminal window, navigate to the
subgraph-reviews
directory.Install the dependencies.
subgraph-reviewsnpm iRun the server in dev mode. Saving files will trigger the server to restart.
subgraph-locationsnpm run dev
You can stop both processes for now. You're all set, see you at the workshop!
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.