Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.22.2 #5073

Merged
merged 4 commits into from Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -11,7 +11,9 @@ The version headers in this history reflect the versions of Apollo Server itself

> 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. With few exceptions, the format of the entry should follow convention (i.e., prefix with package name, use markdown `backtick formatting` for package names and code, suffix with a link to the change-set 脿 la `[PR #YYY](https://link/pull/YYY)`, etc.). 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.

## 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