Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: federation overview #3205

Merged
merged 6 commits into from
Jan 29, 2025
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions docs/source/schema-design/federated-schemas/federation.mdx
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
---
title: Introduction to Apollo Federation
subtitle: Learn how federation combines your GraphQL APIs into a unified supergraph
description: Learn how Apollo Federation can help you declaratively combine your services into a unified, federated GraphQL API using a microservices architecture.
subtitle: Learn how federation orchestrates your APIs into a unified supergraph
description: Learn how Apollo Federation helps you declaratively orchestrate your APIs and services into a unified, federated GraphQL API using a microservices architecture.
redirectFrom:
- /federation
---

Apollo Federation lets you declaratively combine multiple APIs into a single, federated graph. This federated graph enables clients to interact with your APIs through a single request.
Apollo Federation enables you to declaratively combine multiple APIs into a single federated graph. A client makes a single request to a federated GraphQL API, and federation orchestrates calls to multiple APIs to produce a single response.

A client makes a request to the federated GraphQL API's single entry point called the _router_. The router intelligently orchestrates and distributes the request across your APIs and returns a unified response. For a client, the request and response cycle of querying the router looks the same as querying any GraphQL server.
Clients makes requests to the federated GraphQL API's single entry point called the _router_. The router intelligently orchestrates and distributes the request across your APIs and returns a unified response. For a client, the request and response cycle of querying the router looks the same as querying any GraphQL API.

<img src='../../images/federation.svg' class="dark:hidden"/>
<img src='../../images/federation-dark.svg' class="hidden dark:block"/>
Comment on lines 13 to 14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we replace this diagram with one that includes connectors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, we can update in follow-up PR


<Note>

Your federated GraphQL API, or _graph_, can be made of GraphQL APIs and other data sources.
[Learn how Apollo Connectors](../connectors/) simplify incorporating REST APIs into your graph.

</Note>


To jump into building a federated GraphQL API, check out the [Apollo GraphOS Quickstart](/graphos/get-started/guides/quickstart).
Your federated GraphQL API, or _graph_, can be made of GraphQL APIs, REST APIs, and other data sources.

<ExpansionPanel title="Watch the video overview">

Expand Down Expand Up @@ -66,6 +58,10 @@ With Apollo Federation, clients can interact with the federated schema as if it

With federation, every team contributes directly to the overall federated GraphQL schema. Each team can work independently without needing to maintain multiple API layers. This frees your platform team to focus on the quality of your API rather than keeping it up to date.

### Connect APIs declaratively

Apollo Federation is the foundation of Apollo Connectors, which allows you to integrate REST APIs into your federated graph by defining them declaratively in your GraphQL schema.

## Next steps

Before continuing, it's helpful to know some terminology:
Expand All @@ -80,12 +76,18 @@ Different subgraphs in the same supergraph can use different server implementati

Ready to get started?

- Create and run a federated graph with the [Quickstart](/graphos/get-started/guides/quickstart).

- Connect REST APIs to your graph using Apollo Connectors with the [REST quickstart](/graphos/get-started/guides/rest-quickstart).

- Create and run a federated graph with the [Quickstart](/graphos/get-started/guides/quickstart).

### Additional resources

Depending on your goals, you have several options for learning more about federation:
- If you're new to federated architecture, this [overview article](https://graphql.com/learn/federated-architecture/) can familiarize the concepts.
- If you learn best by doing, this [interactive course](https://www.apollographql.com/tutorials/voyage-part1) teaches you to build an example supergraph using Apollo Federation.
If you're new to federated architecture, this [overview article](https://graphql.com/learn/federated-architecture/) can introduce the concepts.

<OdysseyCallout>

- To integrate existing APIs into a federated graph, this [interactive course](https://www.apollographql.com/tutorials/connectors-intro-rest) teaches you how to bring an existing REST API into a GraphQL API using Apollo Connectors.

- To federate a GraphQL backend, this [interactive course](https://www.apollographql.com/tutorials/voyage-part1) teaches you how to build an example supergraph using Apollo Federation.

</OdysseyCallout>