5. Federation from day 1: Thinking in entities
5m

Federation from day 1: Thinking in entities

Explore and architecture in this beginner-friendly workshop. Learn to modularize your backend by creating and using entities, publishing , and leveraging tools like . Gain hands-on experience with federated architecture, creation, and subgraph interaction.

What you'll learn

  • The federated architecture of a ( and the )
  • Create and publish s
  • Use the to interact with your
  • Create and use entities between s

Who this workshop is for

  • API developers with a basic understanding of , such as building queries and working with a schema, but not familiar with .

Workshop resources

  • Workshop slides PDF
  • Workshop companion
  • Workshop project repo

⚠️ 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:

Pre-requisites list

You will also need:

Clone the repo locally

  1. Clone the repo.

    git clone https://github.com/apollographql-education/summit24-federation-entities.git
  2. Open 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

  1. In a new terminal window, navigate to the subgraph-locations directory.

  2. Install the dependencies.

    subgraph-locations
    npm i
  3. Run the server in dev mode. Saving files will trigger the server to restart.

    subgraph-locations
    npm run dev
  4. In another terminal window, navigate to the subgraph-reviews directory.

  5. Install the dependencies.

    subgraph-reviews
    npm i
  6. Run the server in dev mode. Saving files will trigger the server to restart.

    subgraph-locations
    npm run dev
Task!

You can stop both processes for now. You're all set, see you at the workshop!

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.