Skip to content

Commit

Permalink
Merge branch 'release-2.22.2' into main
Browse files Browse the repository at this point in the history
Resolved CHANGELOG.md conflicts
  • Loading branch information
glasser committed Mar 29, 2021
2 parents 569d8e6 + 9562af4 commit 2f27764
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,10 @@ The version headers in this history reflect the versions of Apollo Server itself
- `apollo-server-core`: Add optional argument to `ApolloServer.executeOperation` allowing the caller to manually specify an argument to the `config` function analogous to that provided by integration packages. [PR #4166](https://github.com/apollographql/apollo-server/pull/4166) [Issue #2886](https://github.com/apollographql/apollo-server/issues/2886)

## v2.22.2

- `apollo-server-core`: Fix a regression in v2.22.0 where combining `apollo-server-core` v2.22 with an older version of an integration package could lead to startup errors like `called start() with surprising state invoking serverWillStart`. The fix involves changing the semantics of the protected `willStart` method (which is left in only for backwards compatibility). [Issue #5065](https://github.com/apollographql/apollo-server/issues/5065) [Issue #5066](https://github.com/apollographql/apollo-server/issues/5066) [PR #5073](https://github.com/apollographql/apollo-server/pull/5073)

## v2.22.1

- `apollo-server-core`: Fix a regression in v2.22.0 where startup errors could be thrown as part of the GraphQL response instead of redacted in one edge case. [PR #5064](https://github.com/apollographql/apollo-server/pull/5064)
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-azure-functions/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-azure-functions",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for Azure Functions",
"keywords": [
"GraphQL",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-cloud-functions/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-cloud-functions",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for Google Cloud Functions",
"keywords": [
"GraphQL",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-cloudflare/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-cloudflare",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for Cloudflare workers",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-core/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-core",
"version": "2.22.1",
"version": "2.22.2",
"description": "Core engine for Apollo GraphQL server",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
39 changes: 19 additions & 20 deletions packages/apollo-server-core/src/ApolloServer.ts
Expand Up @@ -583,28 +583,27 @@ export class ApolloServerBase {

/**
* @deprecated This deprecated method is provided for backwards compatibility
* with the pre-v2.22 API. It could be used for purposes similar to `start` or
* `ensureStarting`, and was used by integrations. It had odd error handling
* semantics, in that it would ignore any error that came from loading the
* schema, but would throw errors that came from `serverWillStart`. Anyone
* calling it should call `start` or `ensureStarting` instead.
* with the pre-v2.22 API. It was sort of a combination of the v2.22 APIs
* `ensureStarting` and `start`; it was generally called "in the background"
* by integrations to kick off the start process (like `ensureStarting`) and
* then the Promise it returns was awaited later before running operations
* (sort of like `start`). It had odd error handling semantics, in that it
* would ignore any error that came from loading the schema, but would throw
* errors that came from `serverWillStart`.
*
* We keep it around for backwards-compatibility with pre-v2.22 integrations,
* though we just make it call `ensureStarting`. This does mean that the part
* of the integration which awaits its result doesn't actually await anything
* interesting (despite being async, the method itself doesn't await
* anything), but since executing operations now calls `ensureStarted`, that's
* OK. (In v2.22.0 and v2.22.1 we tried to mimic the old `willStart` behavior
* more closely which led to a bug where `start` could be invoked multiple
* times. This approach is simpler.)
*
* Anyone calling this method should call `start` or `ensureStarting` instead.
*/
protected async willStart() {
try {
this._start();
} catch (e) {
if (
this.state.phase === 'failed to start' &&
this.state.error === e &&
!this.state.loadedSchema
) {
// For backwards compatibility with the odd semantics of the old
// willStart method, don't throw if the error occurred in loading the
// schema.
return;
}
throw e;
}
this.ensureStarting();
}

// Part of the backwards-compatibility behavior described above `start` to
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-express/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-express",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for Express and Connect",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-fastify/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-fastify",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for Fastify",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-hapi/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-hapi",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for Hapi",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-integration-testsuite/package.json
@@ -1,7 +1,7 @@
{
"name": "apollo-server-integration-testsuite",
"private": true,
"version": "2.22.1",
"version": "2.22.2",
"description": "Apollo Server Integrations testsuite",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-koa/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-koa",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for Koa",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-lambda/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-lambda",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for AWS Lambda",
"keywords": [
"GraphQL",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-micro/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-micro",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production-ready Node.js GraphQL server for Micro",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-testing/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server-testing",
"version": "2.22.1",
"version": "2.22.2",
"description": "Test utils for apollo-server",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server/package.json
@@ -1,6 +1,6 @@
{
"name": "apollo-server",
"version": "2.22.1",
"version": "2.22.2",
"description": "Production ready GraphQL Server",
"author": "Apollo <opensource@apollographql.com>",
"main": "dist/index.js",
Expand Down

0 comments on commit 2f27764

Please sign in to comment.