Skip to content

Commit f840d9e

Browse files
committed
Merge remote-tracking branch 'origin/master' into release-3.0
2 parents f4ab162 + 02ee848 commit f840d9e

File tree

34 files changed

+6861
-2875
lines changed

34 files changed

+6861
-2875
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ The version headers in this history reflect the versions of Apollo Server itself
55
- [__CHANGELOG for `@apollo/gateway`__](https://github.com/apollographql/apollo-server/blob/master/packages/apollo-gateway/CHANGELOG.md)
66
- [__CHANGELOG for `@apollo/federation`__](https://github.com/apollographql/apollo-server/blob/master/packages/apollo-federation/CHANGELOG.md)
77

8-
### vNEXT
8+
### v2.14.2
99

10-
> The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the appropriate changes within that release will be moved into the new section.
10+
> **Note:** This release is is related to a GitHub Security Advisory published by the Apollo Server team. Please read the attached advisory to understand the impact.
1111
12-
- _Nothing yet! Stay tuned!_
12+
- ⚠️ **SECURITY:** Pass all schema validation rules to the subscription server, including validation rules that restrict introspection when introspection is meant to be disabled. **[Read the full GitHub Security Advisory for details](https://github.com/apollographql/apollo-server/security/advisories/GHSA-w42g-7vfc-xf37)**.
1313

1414
### v2.14.1
1515

docs/package-lock.json

Lines changed: 6724 additions & 2690 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"serve": "gatsby serve"
77
},
88
"dependencies": {
9-
"gatsby": "2.22.9",
9+
"gatsby": "2.23.1",
1010
"gatsby-theme-apollo-docs": "4.2.3",
1111
"react": "16.13.1",
1212
"react-dom": "16.13.1"

docs/source/api/apollo-server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ new ApolloServer({
140140

141141
* `engine`: <`EngineReportingOptions`> | boolean
142142

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.
144144

145145
* `persistedQueries`: <`Object`> | false
146146

@@ -340,7 +340,7 @@ addMockFunctionsToSchema({
340340
341341
API key for the service. Obtain an API key from
342342
[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`
344344
environment variable, although the `apiKey` option takes precedence.
345345
346346
* `logger`: `Logger`

docs/source/deployment/heroku.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ Then, on the app detail page, there is a tab bar at the top, with a "Deploy" opt
6868

6969
## Configuring environment variables
7070

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.
7272

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`.
7474

7575
![Add Graph Manager API Key Screenshot](../images/deployment/heroku/add-env-vars.png)
7676

docs/source/deployment/now.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ After signing in with GitHub, the [Now](https://zeit.co/now) GitHub app can be a
7373
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:
7474

7575
```shell
76-
$ now -e ENGINE_API_KEY=xxxxxxxxx apollographql/graphql-server-example
76+
$ now -e APOLLO_KEY=xxxxxxxxx apollographql/graphql-server-example
7777
```
7878

7979
![Deployed GraphQL Server](../images/deployment/zeit/zeit-apollo-server.png)

docs/source/federation/metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The model of federated metrics is that implementing services report timing and e
1616

1717
## Turning it on
1818

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`.
2020

2121
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!
2222

docs/source/federation/migrating-from-stitching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ After you've registered your schemas, you can start exposing your implementing s
8686

8787
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.
8888

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).
9090

9191
After your gateway is set up, you can make direct queries to it that are routed to the correct implementing services.
9292

docs/source/migration-engine.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Apollo Server provides reporting, persisted queries, and cache-control headers i
77

88
## Stand-alone Apollo Server
99

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.
1111

1212
```js
1313
const { ApolloServer } = require('apollo-server');
@@ -26,7 +26,7 @@ server.listen().then(({ url }) => {
2626
2727
## Starting Engine Proxy
2828

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 `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.
3030

3131
```js
3232
const { ApolloEngine } = require('apollo-engine');
@@ -46,7 +46,7 @@ const server = new ApolloServer({
4646
server.applyMiddleware({ app });
4747

4848
const engine = new ApolloEngine({
49-
apiKey: process.env.ENGINE_API_KEY,
49+
apiKey: process.env.APOLLO_KEY,
5050
});
5151

5252
engine.listen({

docs/source/monitoring/metrics.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ Apollo Server integrates seamlessly with Apollo Graph Manager to help you monito
1313

1414
### Connecting to Graph Manager
1515

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.
2017

2118
### Providing an API key via the `ApolloServer` constructor
2219

@@ -47,14 +44,14 @@ server.listen().then(({ url }) => {
4744

4845
### Providing an API key via environment variables
4946

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.
5249

5350
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).
5451

5552
```bash
5653
# Replace the example values below with values specific to your use case.
57-
ENGINE_API_KEY=YOUR_API_KEY ENGINE_SCHEMA_TAG=development node start-server.js
54+
APOLLO_KEY=YOUR_API_KEY APOLLO_GRAPH_VARIANT=development node start-server.js
5855
```
5956

6057
### Debugging Graph Manager reporting

docs/source/schema/creating-directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Before learning how to implement schema directives, [this section](/schema/direc
99

1010
Since the GraphQL specification does not discuss any specific implementation strategy for directives, it's up to each GraphQL server framework to expose an API for implementing new directives.
1111

12-
If you're using Apollo Server, you are using the [`graphql-tools`](https://github.com/apollographql/graphql-tools) npm package, which provides a convenient yet powerful tool for implementing directive syntax: the [`SchemaDirectiveVisitor`](https://github.com/apollographql/graphql-tools/blob/wip-schema-directives/src/schemaVisitor.ts) class.
12+
If you're using Apollo Server, you are using the [`graphql-tools`](https://github.com/apollographql/graphql-tools) npm package, which provides a convenient yet powerful tool for implementing directive syntax: the [`SchemaDirectiveVisitor`](https://github.com/ardatan/graphql-tools/blob/master/packages/utils/src/SchemaDirectiveVisitor.ts) class.
1313

1414
To implement a schema directive using `SchemaDirectiveVisitor`, simply create a subclass of `SchemaDirectiveVisitor` that overrides one or more of the following visitor methods:
1515

0 commit comments

Comments
 (0)