You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/api/apollo-server.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ new ApolloServer({
140
140
141
141
* `engine`: <`EngineReportingOptions`> | boolean
142
142
143
-
Provided the `ENGINE_API_KEY` environment variable is set, the Graph Manager reporting agent will be started automatically. The API key can also be provided as the `apiKey` field in an object passed as the `engine` field. See the [EngineReportingOptions](#enginereportingoptions) section for a full description of how to configure the reporting agent, including how to include variable values and HTTP headers. When using the Engine proxy, this option should be set to `false`.
143
+
If the `APOLLO_KEY` environment variable is set, the Graph Manager reporting agent starts automatically. The API key can also be provided as the `apiKey` field in an object passed as the `engine` field. See [EngineReportingOptions](#enginereportingoptions) for a full description of how to configure the reporting agent, including how to include variable values and HTTP headers.
144
144
145
145
* `persistedQueries`: <`Object`> | false
146
146
@@ -340,7 +340,7 @@ addMockFunctionsToSchema({
340
340
341
341
API key for the service. Obtain an API key from
342
342
[Graph Manager](https://engine.apollographql.com) by logging in and creating
343
-
a service. You can also specify an API key with the `ENGINE_API_KEY`
343
+
a service. You can also specify an API key with the `APOLLO_KEY`
344
344
environment variable, although the `apiKey` option takes precedence.
Copy file name to clipboardExpand all lines: docs/source/deployment/heroku.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -68,9 +68,9 @@ Then, on the app detail page, there is a tab bar at the top, with a "Deploy" opt
68
68
69
69
## Configuring environment variables
70
70
71
-
To enable the production mode of Apollo Server, you need to set the `NODE_ENV` variable to `production`. To ensure you have visibility into your GraphQL performance in Apollo Server, you'll want to add the `ENGINE_API_KEY` environment variable to Heroku. For the API key, log in to the [Graph Manager UI](https://engine.apollographql.com) and navigate to your service or create a new one.
71
+
To enable the production mode of Apollo Server, you need to set the `NODE_ENV` variable to `production`. To ensure you have visibility into your GraphQL performance in Apollo Server, you'll want to add the `APOLLO_KEY` environment variable to Heroku. For the API key, log in to the [Graph Manager UI](https://engine.apollographql.com) and navigate to your service or create a new one.
72
72
73
-
Under the “Settings” tab, click **Reveal Config Vars**. Next, set `NODE_ENV` to `production` and copy your key from the [Graph Manager UI](http://engine.apollographql.com/) as the value for `ENGINE_API_KEY`.
73
+
Under the Settings tab, click **Reveal Config Vars**. Next, set `NODE_ENV` to `production` and copy your graph API key from the [Graph Manager UI](http://engine.apollographql.com/) as the value for `APOLLO_KEY`.
74
74
75
75

Copy file name to clipboardExpand all lines: docs/source/deployment/now.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ After signing in with GitHub, the [Now](https://zeit.co/now) GitHub app can be a
73
73
The `graphql-server-example` project requires environment variables to enable reporting to Apollo Graph Manager. To deploy to Now with environment variables, the `-e` flag can be used followed by the variables like so:
74
74
75
75
```shell
76
-
$ now -e ENGINE_API_KEY=xxxxxxxxx apollographql/graphql-server-example
76
+
$ now -e APOLLO_KEY=xxxxxxxxx apollographql/graphql-server-example
Copy file name to clipboardExpand all lines: docs/source/federation/metrics.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The model of federated metrics is that implementing services report timing and e
16
16
17
17
## Turning it on
18
18
19
-
Ensure that all dependencies on `apollo-server` are at version `2.7.0` or higher. Provide an API key to your gateway via the `ENGINE_API_KEY` environment variable for the gateway to report metrics to the default ingress. To ensure that implementing services do not report metrics as well, do not provide them with an `ENGINE_API_KEY` or set `{ engine: false }` in the constructor options to `ApolloServer`.
19
+
Ensure that all dependencies on `apollo-server` are at version `2.7.0` or higher. Provide an API key to your gateway via the `APOLLO_KEY` environment variable for the gateway to report metrics to the default ingress. To ensure that implementing services do not report metrics as well, do not provide them with an `APOLLO_KEY` or set `{ engine: false }` in the constructor options to `ApolloServer`.
20
20
21
21
These options will cause the Apollo gateway to collect tracing information from the underlying federated services and pass them on, along with the query plan, to the Apollo metrics ingress. Currently, only Apollo Server supports detailed metrics insights as an implementing service, but we would love to work with you to implement the protocol in other languages!
Copy file name to clipboardExpand all lines: docs/source/federation/migrating-from-stitching.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ After you've registered your schemas, you can start exposing your implementing s
86
86
87
87
We recommend setting up the Apollo Server gateway _alongside_ your existing schema-stitching gateway. Depending on your infrastructure, you might even want to run both in the same _process_ to support dynamically routing traffic through one gateway or the other.
88
88
89
-
To enable managed configuration through Apollo Graph Manager, set the `ENGINE_API_KEY` and `ENGINE_SCHEMA_TAG` environment variables when you start up your Apollo Server gateway, and **do not provide the `serviceList` constructor option to `ApolloGateway`**. For details, see the [Graph Manager documentation](https://www.apollographql.com/docs/graph-manager/federation/#connecting-apollo-server-to-the-graph-manager).
89
+
To enable managed configuration through Apollo Graph Manager, set the `APOLLO_KEY` and `APOLLO_GRAPH_VARIANT` environment variables when you start up your Apollo Server gateway, and **do not provide the `serviceList` constructor option to `ApolloGateway`**. For details, see the [Graph Manager documentation](https://www.apollographql.com/docs/graph-manager/federation/#connecting-apollo-server-to-the-graph-manager).
90
90
91
91
After your gateway is set up, you can make direct queries to it that are routed to the correct implementing services.
Copy file name to clipboardExpand all lines: docs/source/migration-engine.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Apollo Server provides reporting, persisted queries, and cache-control headers i
7
7
8
8
## Stand-alone Apollo Server
9
9
10
-
Apollo Server 2 is able to replace all the metrics-reporting functionality which once required the Apollo Engine Proxy. To enable metrics reporting in Apollo Server 2, add `ENGINE_API_KEY` as an environment variable. With this setting enabled, Apollo Server 2 will automatically send execution traces directly to Apollo Graph Manager. In addition, by default, Apollo Server supports [persisted queries](https://www.apollographql.com/docs/guides/performance/#automatic-persisted-queried) without needing the proxy's cache. Apollo Server also sets `Cache-Control` headers for consumption by a CDN. Integrating a CDN provides an alternative to the full response caching inside of Engine proxy.
10
+
Apollo Server 2 is able to replace all the metrics-reporting functionality which once required the Apollo Engine Proxy. To enable metrics reporting in Apollo Server 2, add `APOLLO_KEY` as an environment variable. With this setting enabled, Apollo Server 2 will automatically send execution traces directly to Apollo Graph Manager. In addition, by default, Apollo Server supports [persisted queries](https://www.apollographql.com/docs/guides/performance/#automatic-persisted-queried) without needing the proxy's cache. Apollo Server also sets `Cache-Control` headers for consumption by a CDN. Integrating a CDN provides an alternative to the full response caching inside of Engine proxy.
Some infrastructure already contains the Engine proxy and requires it for full response caching, so it is necessary to run the proxy as a process alongside Apollo Server. If full response caching is not necessary, then the Engine proxy can be completely replaced by Apollo Server 2. The `apollo-engine` package provides integrations with many [node frameworks](https://www.apollographql.com/docs/engine/setup-node/#not-express), including [express](https://www.apollographql.com/docs/engine/setup-node/#setup-guide), and starts the Engine proxy alongside Apollo Server. The following code demonstrates how to start the proxy with Apollo Server 2. It assumes that the `ENGINE_API_KEY` environment variable is set to the api key of the service.
29
+
Some infrastructure already contains the Engine proxy and requires it for full response caching, so it is necessary to run the proxy as a process alongside Apollo Server. If full response caching is not necessary, then the Engine proxy can be completely replaced by Apollo Server 2. The `apollo-engine` package provides integrations with many [node frameworks](https://www.apollographql.com/docs/engine/setup-node/#not-express), including [express](https://www.apollographql.com/docs/engine/setup-node/#setup-guide), and starts the Engine proxy alongside Apollo Server. The following code demonstrates how to start the proxy with Apollo Server 2. It assumes that the `APOLLO_KEY` environment variable is set to the api key of the service.
30
30
31
31
```js
32
32
const { ApolloEngine } =require('apollo-engine');
@@ -46,7 +46,7 @@ const server = new ApolloServer({
Copy file name to clipboardExpand all lines: docs/source/monitoring/metrics.md
+4-7Lines changed: 4 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,7 @@ Apollo Server integrates seamlessly with Apollo Graph Manager to help you monito
13
13
14
14
### Connecting to Graph Manager
15
15
16
-
To connect Apollo Server to Graph Manager, first [visit the Graph Manager UI](https://engine.apollographql.com/) to get a Graph Manager API key. You can provide this API key to Apollo Server in one of the following ways:
17
-
18
-
* Include the API key in the constructor options for `ApolloServer`.
19
-
* Assign the API key to the `ENGINE_API_KEY` environment variable.
16
+
To connect Apollo Server to Graph Manager, first [obtain a graph API key](https://www.apollographql.com/docs/graph-manager/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.
20
17
21
18
### Providing an API key via the `ApolloServer` constructor
### Providing an API key via environment variables
49
46
50
-
You can provide your Graph Manager API key to Apollo Server via the `ENGINE_API_KEY` environment variable. Similarly, you can assign a particular [variant](https://www.apollographql.com/docs/platform/schema-registry/#managing-environments)
51
-
to an Apollo Server instance via the `ENGINE_SCHEMA_TAG` environment variable.
47
+
You can provide your Graph Manager API key to Apollo Server via the `APOLLO_KEY` environment variable. Similarly, you can assign a particular [variant](https://www.apollographql.com/docs/platform/schema-registry/#managing-environments)
48
+
to an Apollo Server instance via the `APOLLO_GRAPH_VARIANT` environment variable.
52
49
53
50
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).
54
51
55
52
```bash
56
53
# Replace the example values below with values specific to your use case.
0 commit comments