Skip to content

Commit

Permalink
Merge branch 'main' into version-2.8.3-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
sachindshinde authored Jul 12, 2024
2 parents 759bf9d + 6b1d14d commit 42aac5f
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 50 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

[![CircleCI](https://circleci.com/gh/apollographql/federation/tree/main.svg?style=shield)](https://circleci.com/gh/apollographql/federation/tree/main) [![Netlify Status](https://api.netlify.com/api/v1/badges/3a012f93-2d02-41f7-bb2b-848cf005b831/deploy-status)](https://app.netlify.com/sites/apollo-federation-docs/deploys)

---

**Announcement:**
Join 1000+ engineers at GraphQL Summit for talks, workshops, and office hours, Oct 8-10 in NYC. [Get your pass here ->](https://summit.graphql.com/?utm_campaign=github_federation_readme)

---

# Apollo Federation

Apollo Federation is an architecture for declaratively composing APIs into a unified graph. Each team can own their slice of the graph independently, empowering them to deliver autonomously and incrementally.
Expand Down Expand Up @@ -29,11 +36,11 @@ If you ever have any problems, questions, or ideas, the maintainers of this proj

## Who is Apollo?

[Apollo](https://apollographql.com/) builds open-source software and a graph platform to unify GraphQL across your apps and services. We help you ship faster with:
[Apollo](https://apollographql.com/) builds open-source tools and commercial services to make application development easier, better, and accessible to more people. We help you ship faster with:

* [GraphOS](https://www.apollographql.com/docs/graphos) – A free, end-to-end platform for managing your GraphQL lifecycle. Track your GraphQL schemas in a hosted registry to create a source of truth for everything in your graph. GraphOS provides an IDE (Apollo Explorer) so you can explore data, collaborate on queries, observe usage, and safely make schema changes.
* [Apollo Federation](https://www.apollographql.com/apollo-federation) – The industry-standard open architecture for building a distributed graph. Use Apollo’s to compose a unified graph from multiple subgraphs, determine a query plan, and route requests across your services.
* [Apollo Client](https://www.apollographql.com/apollo-client/) – The most popular GraphQL client for the web. Apollo also builds and maintains [Apollo iOS](https://github.com/apollographql/apollo-ios) and [Apollo Android](https://github.com/apollographql/apollo-android).
* [GraphOS](https://www.apollographql.com/graphos) - The platform for building, managing, and scaling a supergraph: a unified network of your organization's microservices and their data sources—all composed into a single distributed API.
* [Apollo Federation](https://www.apollographql.com/federation) – The industry-standard open architecture for building a distributed graph. Use Apollo’s gateway to compose a unified graph from multiple subgraphs, determine a query plan, and route requests across your services.
* [Apollo Client](https://github.com/apollographql/apollo-client) – The most popular GraphQL client for the web. Apollo also builds and maintains [Apollo iOS](https://github.com/apollographql/apollo-ios) and [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin).
* [Apollo Server](https://www.apollographql.com/docs/apollo-server/) – A production-ready JavaScript GraphQL server that connects to any microservice, API, or database. Compatible with all popular JavaScript frameworks and deployable in serverless environments.

## Learn how to build with Apollo
Expand Down
2 changes: 1 addition & 1 deletion docs/shared/enterprise-directive.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<EnterpriseFeature>

This directive is an [Enterprise feature](/router/enterprise-features) of the Apollo Router and requires an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). If your organization doesn't have an Enterprise plan, you can test it out by signing up for a free [Enterprise trial](/graphos/org/plans/#enterprise-trials).
This directive is an [Enterprise feature](/router/enterprise-features) of the GraphOS Router and requires an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). If your organization doesn't have an Enterprise plan, you can test it out by signing up for a free [Enterprise trial](/graphos/org/plans/#enterprise-trials).

</EnterpriseFeature>
2 changes: 1 addition & 1 deletion docs/shared/progressive-override-enterprise.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<EnterpriseFeature>

Progressive `@override` is an [Enterprise feature](/router/enterprise-features) of the Apollo Router and requires an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). If your organization doesn't have an Enterprise plan, you can test it out by signing up for a free [Enterprise trial](/graphos/org/plans/#enterprise-trials).
Progressive `@override` is an [Enterprise feature](/router/enterprise-features) of the GraphOS Router and requires an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). If your organization doesn't have an Enterprise plan, you can test it out by signing up for a free [Enterprise trial](/graphos/org/plans/#enterprise-trials).

</EnterpriseFeature>
3 changes: 2 additions & 1 deletion docs/source/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
/quickstart-pt-2/ /docs/federation/quickstart/
/quickstart-pt-3/ /docs/federation/quickstart/
/quickstart-pt-4/ /docs/federation/quickstart/
/quickstart/setup/ /docs/federation/quickstart/
/quickstart/studio-composition/ /docs/federation/quickstart/
/quickstart/local-composition/ /docs/federation/quickstart/
/quickstart/local-subgraphs/ /docs/federation/quickstart/

/managed-federation/monitoring/ /docs/federation/performance/monitoring
/api/apollo-federation/ /docs/federation/api/apollo-subgraph/
/api/apollo-federation/ /docs/federation/api/apollo-subgraph/
16 changes: 4 additions & 12 deletions docs/source/building-supergraphs/router.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,18 @@ graph LR;

Apollo actively supports the following options for your router:

- **The Apollo Router (recommended)**: This is a high-performance, precompiled Rust binary.
- **The graphos Router (recommended)**: This is a high-performance, precompiled Rust binary.

- If you're getting started with federation, we recommend [creating a cloud supergraph](/graphos/quickstart/cloud/) with Apollo GraphOS. With a cloud supergraph, GraphOS provisions and manages your router for you.
- You can also host your own Apollo Router instances. [See the Federation Quickstart](../quickstart/setup/) to get started.
- You can also host your own GraphOS Router instances. [See the Federation Quickstart](../quickstart/setup/) to get started.

- **Apollo Server**: Apollo Server can act as your router via the [`@apollo/gateway`](https://www.npmjs.com/package/@apollo/gateway) extension library.
- [See how to set up Apollo Gateway](/apollo-server/using-federation/apollo-gateway-setup).

<Tip>

Apollo recommends starting with the Apollo Router. It's faster to configure, performant even under high request loads, and supports many enterprise features.
Apollo recommends starting with the GraphOS Router. It's faster to configure, performant even under high request loads, and supports many enterprise features.

</Tip>

<ExpansionPanel title="When should I use Apollo Server?">

You might need to use Apollo Server for your router if your subgraphs use a custom authentication method that it's currently difficult to configure with the Apollo Router. Note that teams unfamiliar with Rust can still customize the Apollo Router's behavior using the [Rhai scripting language](/router/customizations/rhai).

Regardless of which library you start with, you can swap to the other without making any changes to other parts of your supergraph.

</ExpansionPanel>

If you'll use the Apollo Router, get started with the resources linked above. If you'll use Apollo Server, see [Setting up Apollo Gateway](/apollo-server/using-federation/apollo-gateway-setup).
If you'll use the GraphOS Router, get started with the resources linked above. If you'll use Apollo Server, see [Setting up Apollo Gateway](/apollo-server/using-federation/apollo-gateway-setup).
2 changes: 1 addition & 1 deletion docs/source/entities-advanced.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ This problem is not limited to reference resolvers. In fact, it can occur with a

<EnterpriseFeature>

The `@context` and `@fromContext` directives are [Enterprise features](/router/enterprise-features) of the Apollo Router and require an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). If your organization doesn't have an Enterprise plan, you can test it out by signing up for a free [Enterprise trial](/graphos/org/plans/#enterprise-trials).
The `@context` and `@fromContext` directives are [Enterprise features](/router/enterprise-features) of the GraphOS Router and require an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). If your organization doesn't have an Enterprise plan, you can test it out by signing up for a free [Enterprise trial](/graphos/org/plans/#enterprise-trials).

</EnterpriseFeature>

Expand Down
8 changes: 4 additions & 4 deletions docs/source/federated-types/federated-directives.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ To learn more, see the [Incremental migration with `@override`](../entities-adva

<EnterpriseFeature>

This argument is available in Apollo Federation 2.7 and later. It is an [Enterprise feature](/router/enterprise-features) of the Apollo Router and requires an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). You can test it out by signing up for a free [Enterprise trial](/graphos/org/plans/#enterprise-trials).
This argument is available in Apollo Federation 2.7 and later. It is an [Enterprise feature](/router/enterprise-features) of the GraphOS Router and requires an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). You can test it out by signing up for a free [Enterprise trial](/graphos/org/plans/#enterprise-trials).

</EnterpriseFeature>

Expand Down Expand Up @@ -472,7 +472,7 @@ directive @authenticated on
| ENUM
```

Indicates to composition that the target element is accessible only to the authenticated supergraph users. For more granular access control, see the [`@requiresScopes`](#requiresScopes) directive below. Refer to the [Apollo Router article](/router/configuration/authorization#authenticated) for additional details.
Indicates to composition that the target element is accessible only to the authenticated supergraph users. For more granular access control, see the [`@requiresScopes`](#requiresScopes) directive below. Refer to the [router article](/router/configuration/authorization#authenticated) for additional details.

<MinVersion version="2.5">

Expand All @@ -491,7 +491,7 @@ directive @requiresScopes(scopes: [[federation__Scope!]!]!) on
| ENUM
```

Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. Refer to the [Apollo Router article](/router/configuration/authorization#requiresscopes) for additional details.
Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. Refer to the [router article](/router/configuration/authorization#requiresscopes) for additional details.

#### Arguments

Expand Down Expand Up @@ -540,7 +540,7 @@ directive @policy(policies: [[federation__Policy!]!]!) on
| ENUM
```

Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor. Refer to the [Apollo Router article](/router/configuration/authorization#policy) for additional details.
Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor. Refer to the [router article](/router/configuration/authorization#policy) for additional details.

#### Arguments

Expand Down
4 changes: 2 additions & 2 deletions docs/source/federation-2/backward-compatibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Yes. As of 15 November 2022, `@apollo/gateway` v0.x is officially deprecated, wi

Eventually. The process of [moving to Federation 2](./moving-to-federation-2/) has three steps:

1. Upgrade your gateway to support Federation 2 (we recommend [moving to the Apollo Router](/router/migrating-from-gateway/)).
1. Upgrade your gateway to support Federation 2 (we recommend [moving to the GraphOS Router](/router/migrating-from-gateway/)).
2. Begin composing your supergraph schema with Federation 2 composition logic.
3. Update your individual subgraphs to use Federation 2 features and directives.

Expand Down Expand Up @@ -198,6 +198,6 @@ Your plugins and customizations for `@apollo/gateway` `0.x` will continue to wor

| Router/Gateway version | Federation 1<br/>Composition | Federation 2<br/>Composition |
|-|--------------|--------------|
| [Apollo Router](https://www.apollographql.com/docs/router/) v1.x | 🟢 | 🟢 |
| [Apollo Router Core](https://www.apollographql.com/docs/router/) v1.x | 🟢 | 🟢 |
| `@apollo/gateway` v2.x | 🟢 | 🟢 |
| `@apollo/gateway` v0.x (deprecated) | 🟢 | ❌ |
14 changes: 7 additions & 7 deletions docs/source/federation-2/moving-to-federation-2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ graph LR;

You can upgrade to either of the following:

- [The Apollo Router](/router/), a high-performance precompiled executable (recommended)
- [The GraphOS Router](/router/), a high-performance precompiled executable (recommended)
- Version 2.x of the `@apollo/gateway` library, along with version 4.x of Apollo Server
2. Begin composing your supergraph schema with Federation 2 composition logic.
3. Update your individual subgraphs to use Federation 2 features and directives.
Expand All @@ -40,20 +40,20 @@ If you encounter an issue while moving your supergraph to Federation 2, please d

For your Federation 1 supergraph to support Federation 2, you first need to upgrade its gateway to one of the following:

- The Apollo Router. This is a high-performance, precompiled executable that provides many benefits over the Node.js-based gateway.
- We recommend moving to the Apollo Router unless you've extended your Node.js gateway with functionality that the Apollo Router doesn't currently support (this is uncommon).
- The GraphOS Router. This is a high-performance, precompiled executable that is based on the Apollo Router Core and provides many benefits over the Node.js-based gateway.
- We recommend moving to the GraphOS Router unless you've extended your Node.js gateway with functionality that the GraphOS Router doesn't currently support (this is uncommon).
- Version 2.x of the `@apollo/gateway` library, with version 4.x of Apollo Server

<Note>

Both the Apollo Router and `@apollo/gateway` v2.x support Federation 1. You can upgrade to either without making any other changes to your Federation 1 supergraph, and it will work as expected.
Both the GraphOS Router and `@apollo/gateway` v2.x support Federation 1. You can upgrade to either without making any other changes to your Federation 1 supergraph, and it will work as expected.

</Note>

### Moving to the Apollo Router
### Moving to the GraphOS Router

- To get started running the Apollo Router, see the [quickstart](/router/quickstart/).
- For guidance on moving to the Apollo Router from your Node.js-based gateway, see [this article](/router/migrating-from-gateway).
- To get started running the GraphOS Router, see the [quickstart](/router/quickstart/).
- For guidance on moving to the GraphOS Router from your Node.js-based gateway, see [this article](/router/migrating-from-gateway).

### Upgrading `@apollo/gateway` and Apollo Server

Expand Down
2 changes: 1 addition & 1 deletion docs/source/federation-versions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ Subscriptions
<td>

- Composition now supports defining the `Subscription` type in subgraph schemas.
- Use of GraphQL subscriptions with a federated graph requires a compatible version of the Apollo Router. [See details.](/router/executing-operations/subscription-support/#prerequisites)
- Use of GraphQL subscriptions with a federated graph requires a compatible version of the GraphOS Router. [See details.](/router/executing-operations/subscription-support/#prerequisites)

</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/source/managed-federation/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ When running your gateway in an environment where outbound traffic to the intern

</ExpansionPanel>

If you've already set up Apollo Federation without connecting your router to GraphOS, you're probably passing the [`--supergraph` (or `-s`) option](/router/configuration/overview/#-s----supergraph) to the Apollo Router's startup command:
If you've already set up Apollo Federation without connecting your router to GraphOS, you're probably passing the [`--supergraph` (or `-s`) option](/router/configuration/overview/#-s----supergraph) to the GraphOS Router's startup command:

```sh
./router --config ./router.yaml --supergraph ./your-local-supergraph.graphql
Expand Down
14 changes: 7 additions & 7 deletions docs/source/managed-federation/uplink.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ To maximize uptime, Uplink is hosted simultaneously at two endpoints, one in GCP

## Default polling behavior

### Apollo Router
### GraphOS Router

If you use the Apollo Router with managed federation, by default it polls Uplink every ten seconds. Every time it does so, it cycles through Uplink endpoints in round-robin fashion.
If you use the GraphOS Router with managed federation, by default it polls Uplink every ten seconds. Every time it does so, it cycles through Uplink endpoints in round-robin fashion.

Whenever a poll request times out or otherwise fails (the default timeout is thirty seconds), the router continues polling as usual at the next interval. In the meantime, it continues using its most recent successfully obtained configuration.

Expand All @@ -59,16 +59,16 @@ You can configure the following aspects of your router's Uplink polling behavior

- The interval at which your router polls (minimum ten seconds)
- The list of Uplink URLs your router uses
- The request timeout for each poll request (Apollo Router only)
- The request timeout for each poll request (GraphOS Router only)
- For `@apollo/gateway`, this value is always thirty seconds.
- The number of retries performed for a failed poll request (`@apollo/gateway` only)
- The Apollo Router does not perform retries for a failed poll request. It continues polling at the next interval.
- The GraphOS Router does not perform retries for a failed poll request. It continues polling at the next interval.

### Apollo Router
### GraphOS Router

You configure Uplink polling for the Apollo Router by providing certain command-line options when running the router executable. These options all start with `--apollo-uplink`.
You configure Uplink polling for the GraphOS Router by providing certain command-line options when running the router executable. These options all start with `--apollo-uplink`.

[See the Apollo Router docs](/router/configuration/overview#--apollo-uplink-endpoints).
[See the GraphOS Router docs](/router/configuration/overview#--apollo-uplink-endpoints).

### `@apollo/gateway`

Expand Down
2 changes: 1 addition & 1 deletion docs/source/opentelemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can configure your gateway, your individual subgraphs, or even a monolothic

Additionally, the `@apollo/gateway` library provides built-in OpenTelemetry instrumentation to emit [gateway-specific spans](#gateway-specific-spans) for operation traces.

If you are using Apollo Router, it comes [pre-built with support for OpenTelemetry](/router/configuration/telemetry/overview).
If you are using GraphOS Router, it comes [pre-built with support for OpenTelemetry](/router/configuration/telemetry/overview).

<Note>

Expand Down
Loading

0 comments on commit 42aac5f

Please sign in to comment.