Skip to content

Commit 892f359

Browse files
authored
docs: encourage setting APOLLO_GRAPH_ID (#5226)
Part of #5157.
1 parent d6b1bd4 commit 892f359

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/source/api/apollo-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Provide this function to transform the structure of GraphQL response objects bef
316316
An object containing configuration options for connecting Apollo Server to [Apollo Studio](https://www.apollographql.com/docs/studio/). Each field of this object can also be set with an environment variable, which is the recommended method of setting these parameters. All fields are optional. The fields are:
317317

318318
- `key`: The [graph API key](https://www.apollographql.com/docs/studio/api-keys/#graph-api-keys) that Apollo Server should use to authenticate with Apollo Studio. You can set this with the `APOLLO_KEY` environment variable.
319-
- `graphId`: The ID of your graph in Apollo's registry. You can set this with the `APOLLO_GRAPH_ID` environment variable. Most users will not specify this explicitly and allow Apollo Server to infer the ID from your API key.
319+
- `graphId`: The ID of your graph in Apollo's registry. You can set this with the `APOLLO_GRAPH_ID` environment variable.
320320
- `graphVariant`: The [variant](https://www.apollographql.com/docs/studio/schema/registry/#managing-environments-with-variants) of your graph to associate this server's schema and metrics with. You can set this with the `APOLLO_GRAPH_VARIANT` environment variable. The default value is `current`.
321321

322322
</td>

docs/source/monitoring/metrics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Apollo Server integrates seamlessly with Apollo Studio to help you monitor the e
1515

1616
To connect Apollo Server to Apollo Studio, first [obtain a graph API key](https://www.apollographql.com/docs/studio/setup-analytics/#pushing-traces-from-apollo-server). To provide this key to Apollo Server, assign it to the `APOLLO_KEY` environment variable in your server's environment.
1717

18-
Similarly, you can associate your server instance with a particular [graph variant](https://www.apollographql.com/docs/studio/schema/registry/#managing-environments-with-variants) by setting the `APOLLO_GRAPH_VARIANT` environment variable.
18+
Then associate your server instance with a particular graph ID and [graph variant](https://www.apollographql.com/docs/studio/schema/registry/#managing-environments-with-variants) by setting the `APOLLO_GRAPH_ID` and `APOLLO_GRAPH_VARIANT` environment variables.
1919

2020
You can set environment variable values on the command line as seen below, or with the [`dotenv` npm package](https://www.npmjs.com/package/dotenv) (or similar).
2121

2222
```bash
2323
# Replace the example values below with values specific to your use case.
24-
APOLLO_KEY=YOUR_API_KEY APOLLO_GRAPH_VARIANT=development node start-server.js
24+
APOLLO_KEY=YOUR_API_KEY APOLLO_GRAPH_ID=mygraph APOLLO_GRAPH_VARIANT=development node start-server.js
2525
```
2626

2727
### Identifying distinct clients

0 commit comments

Comments
 (0)