Skip to content

Commit a86b538

Browse files
authored
Update docs for graph artifacts (#8288)
1 parent 41c908c commit a86b538

File tree

4 files changed

+27
-17
lines changed

4 files changed

+27
-17
lines changed

apollo-router/src/executable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ pub struct Opt {
221221
// Should be a Vec<Url> when https://github.com/clap-rs/clap/discussions/3796 is solved
222222
apollo_uplink_endpoints: Option<String>,
223223

224-
/// An OCI reference to an image that contains the supergraph schema for the router.
224+
/// An OCI reference to a graph artifact that contains the supergraph schema for the router to run.
225225
#[clap(long, env = "APOLLO_GRAPH_ARTIFACT_REFERENCE", action = ArgAction::Append)]
226226
graph_artifact_reference: Option<String>,
227227

docs/source/routing/configuration/cli.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,12 @@ For default behavior and possible values, see [Apollo Uplink](/federation/manage
184184
</td>
185185
<td>
186186

187-
An OCI reference to an image that contains the supergraph schema for the router.<br/>
187+
An OCI reference to a graph artifact that contains the supergraph schema for the router to run.<br/><br/>
188188

189-
When this option is set, the router will fetch the schema from the specified OCI image instead of using Apollo Uplink. Note that Apollo Uplink will still be used for entitlements and persisted queries.<br/>
189+
When you set this option, the router uses the schema from the specified graph artifact instead of Apollo Uplink.
190+
The router still fetches entitlements and persisted queries from Uplink.<br/><br/>
190191

191-
⚠️ **This option does not support hot reloading schemas.**
192+
⚠️ **This option is in preview and doesn't support hot-reloading of schemas.**
192193

193194
</td>
194195
</tr>

docs/source/routing/self-hosted/containerization/docker-router-only.mdx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The exact image version to use depends on which release you wish to use. In the
2424

2525
## Basic example running router in Docker
2626

27-
To run the router, your Docker container must have the [`APOLLO_GRAPH_REF`](/router/configuration/overview#apollo_graph_ref) and [`APOLLO_KEY`](/router/configuration/overview#apollo_key) environment variables set to your graph ref and API key, respectively.
27+
To run the router, set the [`APOLLO_GRAPH_REF`](/graphos/routing/configuration/envvars#apollo_graph_ref) and [`APOLLO_KEY`](/graphos/routing/configuration/envvars#apollo_key) environment variables in your Docker container to your graph ref and API key.
2828

2929
Below is a basic example of running a router image with Docker, either with `docker run` or `docker compose`. It downloads your supergraph schema from Apollo and uses a default configuration that listens for connections on port `4000`.
3030

@@ -53,7 +53,7 @@ services:
5353
5454
Whether you use `docker run` or `docker compose`, make sure to replace `<router-image-version>` with whichever version you want to use, and `<your-graph-ref>` and `<your-graph-api-key>` with your graph reference and API key, respectively.
5555

56-
For more complex configurations, such as overriding subgraph URLs or propagating headers, see [Router Configuration](/router/configuration/overview/).
56+
For more complex configurations, such as overriding subgraph URLs or propagating headers, see [Router Configuration](/graphos/routing/configuration/overview/).
5757

5858
## Override the configuration
5959

@@ -148,19 +148,24 @@ docker run -p 4000:4000 \
148148

149149
In this example, we have to mount the local definition of the supergraph into our image, _and_ specify the location of the file. It doesn't have to be mounted in the `/dist/schema` directory, but it's a reasonable location to use. We must specify the configuration file location as well, since overriding the default params will override our default config file location. In this case, since we don't want to change our router configuration but want to make sure it's used, we just specify the default location of the default configuration.
150150

151-
### Using an OCI image reference
151+
### Using a graph artifact reference
152152

153-
You can use the `--graph-artifact-reference` option to fetch the supergraph schema from an OCI image:
153+
⚠️ This option is in preview and doesn't support hot-reloading of schemas.
154+
155+
Set the `APOLLO_GRAPH_ARTIFACT_REFERENCE` environment variable to use the supergraph schema from a graph artifact:
154156

155157
```bash
156158
docker run -p 4000:4000 \
157159
--env APOLLO_KEY="<your-graph-api-key>" \
158-
--env APOLLO_GRAPH_ARTIFACT_REFERENCE="<your-oci-reference>" \
160+
--env APOLLO_GRAPH_ARTIFACT_REFERENCE="<your-graph-artifact-reference>" \
159161
--rm \
160162
ghcr.io/apollographql/router:<router-image-version>
161163
```
162164

163-
When using this option, the router will fetch the schema from the specified OCI image instead of using Apollo Uplink.
165+
When you set this option, the router uses the schema from the specified graph artifact instead of Apollo Uplink.
166+
The router still fetches entitlements and persisted queries from Uplink.
167+
168+
For more information on graph artifacts, see the [Router CLI Configuration Reference](/graphos/routing/configuration/cli#--graph-artifact-reference).
164169

165170
## Building your own container
166171

docs/source/routing/self-hosted/containerization/docker.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The exact image version to use depends on which release you wish to use. In the
2020

2121
## Quick start
2222

23-
To run the router, your Docker container must have the [`APOLLO_GRAPH_REF`](/router/configuration/overview#apollo_graph_ref) and [`APOLLO_KEY`](/router/configuration/overview#apollo_key) environment variables set to your graph ref and API key, respectively.
23+
To run the router, set the [`APOLLO_GRAPH_REF`](/graphos/routing/configuration/envvars#apollo_graph_ref) and [`APOLLO_KEY`](/graphos/routing/configuration/envvars#apollo_key) environment variables in your Docker container to your graph ref and API key.
2424

2525
Below is a basic example of running an Apollo Runtime image with Docker. It downloads your supergraph schema from Apollo and uses a default configuration that listens for connections on port `4000`.
2626

@@ -94,21 +94,25 @@ Both local and container paths must be specified as absolute paths.
9494
If you don't want to automatically update your supergraph via [Apollo Uplink](/federation/managed-federation/uplink/), or you don't have connectivity to access Apollo Uplink from your environment, you have two options:
9595
9696
1. Using a local supergraph file, as documented in the [Configuring using local files](#configuring-using-local-files) section.
97-
1. Using an [OCI image reference](#using-an-oci-image-reference)
97+
1. Using a [graph artifact reference](#using-a-graph-artifact-reference)
9898
99-
### Using an OCI image reference
99+
### Using a graph artifact reference
100100
101-
You can use the `APOLLO_GRAPH_ARTIFACT_REFERENCE` environment variable to fetch the supergraph schema from an OCI image:
101+
⚠️ This option is in preview and doesn't support hot-reloading of schemas.
102+
103+
Set the `APOLLO_GRAPH_ARTIFACT_REFERENCE` environment variable to use the supergraph schema from a graph artifact:
102104
103105
```bash
104106
docker run -p 4000:4000 \
105107
--env APOLLO_KEY="<your-graph-api-key>" \
106-
--env APOLLO_GRAPH_ARTIFACT_REFERENCE="<your-oci-reference>" \
108+
--env APOLLO_GRAPH_ARTIFACT_REFERENCE="<your-graph-artifact-reference>" \
107109
--rm \
108110
ghcr.io/apollographql/apollo-runtime:<runtime-image-version>
109111
```
110112
111-
When using this option, the router will fetch the schema from the specified OCI image instead of using Apollo Uplink. Additional information on graph artifacts is available in the [router CLI options documentation](/docs/graphos/routing/configuration/cli#command-line-options).
113+
When you set this option, the router uses the schema from the specified graph artifact instead of Apollo Uplink.
114+
The router still fetches entitlements and persisted queries from Uplink.
115+
For more information on graph artifacts, see the [Router CLI Configuration Reference](/graphos/routing/configuration/cli#--graph-artifact-reference).
112116
113117
## Running a specific Router and MCP version
114118
@@ -118,7 +122,7 @@ To learn more, see the [tagging documentation](https://github.com/apollographql/
118122
119123
## Additional router configuration information
120124
121-
For more complex configurations, such as overriding subgraph URLs or propagating headers, see [Router Configuration](/router/configuration/overview/).
125+
For more complex configurations, such as overriding subgraph URLs or propagating headers, see [Router Configuration](/graphos/routing/configuration/overview/).
122126
123127
## Router-only Docker container
124128

0 commit comments

Comments
 (0)