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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.21.0 #4922

Merged
merged 7 commits into from
Feb 12, 2021
Merged

Release 2.21.0 #4922

merged 7 commits into from
Feb 12, 2021

Conversation

glasser
Copy link
Member

@glasser glasser commented Feb 11, 2021

As with release PRs in the past, this is a PR tracking a release-x.y.z branch for an upcoming release of Apollo Server. 🙌 The version in the title of this PR should correspond to the appropriate branch.

Check the appropriate milestone (to the right) for more details on what we hope to get into this release!

The intention of these release branches is to gather changes which are intended to land in a specific version (again, indicated by the subject of this PR). Release branches allow additional clarity into what is being staged, provide a forum for comments from the community pertaining to the release's stability, and to facilitate the creation of pre-releases (e.g. alpha, beta, rc) without affecting the main branch.

PRs for new features might be opened against or re-targeted to this branch by the project maintainers. The main branch may be periodically merged into this branch up until the point in time that this branch is being prepared for release. Depending on the size of the release, this may be once it reaches RC (release candidate) stage with an -rc.x release suffix. Some less substantial releases may be short-lived and may never have pre-release versions.

When this version is officially released onto the latest npm tag, this PR will be merged into main.

 - apollo-server-azure-functions@2.21.0-alpha.0
 - apollo-server-cloud-functions@2.21.0-alpha.0
 - apollo-server-cloudflare@2.21.0-alpha.0
 - apollo-server-core@2.21.0-alpha.0
 - apollo-server-express@2.21.0-alpha.0
 - apollo-server-fastify@2.21.0-alpha.0
 - apollo-server-hapi@2.21.0-alpha.0
 - apollo-server-integration-testsuite@2.21.0-alpha.0
 - apollo-server-koa@2.21.0-alpha.0
 - apollo-server-lambda@2.21.0-alpha.0
 - apollo-server-micro@2.21.0-alpha.0
 - apollo-server-testing@2.21.0-alpha.0
 - apollo-server@2.21.0-alpha.0
This fork is identical to graphql-upload@8.1.0 except that it allows graphql@15
as a peer dependency (and bundles the TypeScript type definitions directly).

For #4865.

Note that we do plan to remove this integration in Apollo Server 3, but for now
we want you to be able to combine AS2 with graphql@15 and npm@7.
 - apollo-server-azure-functions@2.21.0-alpha.1
 - apollo-server-cloud-functions@2.21.0-alpha.1
 - apollo-server-cloudflare@2.21.0-alpha.1
 - apollo-server-core@2.21.0-alpha.1
 - apollo-server-express@2.21.0-alpha.1
 - apollo-server-fastify@2.21.0-alpha.1
 - apollo-server-hapi@2.21.0-alpha.1
 - apollo-server-integration-testsuite@2.21.0-alpha.1
 - apollo-server-koa@2.21.0-alpha.1
 - apollo-server-lambda@2.21.0-alpha.1
 - apollo-server-micro@2.21.0-alpha.1
 - apollo-server-testing@2.21.0-alpha.1
 - apollo-server@2.21.0-alpha.1
@glasser glasser added this to the Release 2.21.0 milestone Feb 11, 2021
@glasser
Copy link
Member Author

glasser commented Feb 11, 2021

This release only has one change (edit: see below, there's one other tiny deps change too): replacing the graphql-upload dependency with a fork called @apollographql/graphql-upload-8-fork which adds a peer dependency on graphql@15.

I published an alpha.0 which did not have the dependency change and an alpha.1 which does. Using npm v7.5.1 (Node v15.8.0) I observed the following.

Trying to install alpha.0 (just the express package) with graph@15 failed:

$ npm install  graphql@15 apollo-server-express@2.21.0-alpha.0
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: graphql@15.5.0
npm ERR! node_modules/graphql
npm ERR!   graphql@"15" from the root project
npm ERR!   peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-server-express@2.21.0-alpha.0
npm ERR!   node_modules/apollo-server-express
npm ERR!     apollo-server-express@"2.21.0-alpha.0" from the root project
npm ERR!   13 more (apollo-server-core, apollo-server-types, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"0.13.1 - 14" from graphql-upload@8.1.0
npm ERR! node_modules/apollo-server-core/node_modules/graphql-upload
npm ERR!   graphql-upload@"^8.0.2" from apollo-server-core@2.21.0-alpha.0
npm ERR!   node_modules/apollo-server-core
npm ERR!     apollo-server-core@"^2.21.0-alpha.0" from apollo-server-express@2.21.0-alpha.0
npm ERR!     node_modules/apollo-server-express
npm ERR!       apollo-server-express@"2.21.0-alpha.0" from the root project
...

Trying to install alpha.1 with graphql@15 succeeds! (Here I tried all the packages.)

 $ npm install graphql@15 apollo-server-azure-functions@2.21.0-alpha.1 apollo-server-cloud-functions@2.21.0-alpha.1 apollo-server-cloudflare@2.21.0-alpha.1 apollo-server-core@2.21.0-alpha.1 apollo-server-express@2.21.0-alpha.1 apollo-server-fastify@2.21.0-alpha.1 apollo-server-hapi@2.21.0-alpha.1 apollo-server-koa@2.21.0-alpha.1 apollo-server-lambda@2.21.0-alpha.1 apollo-server-micro@2.21.0-alpha.1 apollo-server-testing@2.21.0-alpha.1 apollo-server@2.21.0-alpha.1
npm WARN deprecated boom@7.3.0: This module has moved and is now available at @hapi/boom. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated accept@3.1.3: This module has moved and is now available at @hapi/accept. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.

added 233 packages, and audited 234 packages in 4s

19 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

The deprecation messages are specific to apollo-server-hapi and apollo-server-micro and are not displayed if you don't install those particular integrations.

(Note: we will not be doing further feature development in this fork. It's just to fix the peer dependency, not to try to take over development from @jaydenseric! Additionally, we are still planning to drop the built-in upload integration from Apollo Server 3. We encourage folks who want to use graphql-upload to use the latest version and use it directly rather than use AS2's integration, as documented by @abernix at #3508 (comment))

I'd love to get some reports from users (especially those who actually use the graphql-upload integration!) that these alphas work for you before I release. So if you can install 2.21.0-alpha.1 of apollo-server-core and whatever integration package you use and report here, that would be great!

@@ -55,6 +55,7 @@
"graphql-extensions": "file:packages/graphql-extensions"
},
"devDependencies": {
"@apollographql/graphql-upload-8-fork": "^8.1.3",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this to make it visible to a build-time-only import type in apollo-server-fastify (I think that's the right way to do it?).

@glasser
Copy link
Member Author

glasser commented Feb 11, 2021

Hmm, I think I should also resolve #3954 in this release.

That's the version that's required for graphql@15 support. Let's make things
smoother by helping people get it installed even if they have an old
package-lock with 4.0.0 in it.

Fixes #3954.
 - apollo-server-azure-functions@2.21.0-alpha.2
 - apollo-server-cloud-functions@2.21.0-alpha.2
 - apollo-server-cloudflare@2.21.0-alpha.2
 - apollo-server-core@2.21.0-alpha.2
 - apollo-server-express@2.21.0-alpha.2
 - apollo-server-fastify@2.21.0-alpha.2
 - apollo-server-hapi@2.21.0-alpha.2
 - apollo-server-integration-testsuite@2.21.0-alpha.2
 - apollo-server-koa@2.21.0-alpha.2
 - apollo-server-lambda@2.21.0-alpha.2
 - apollo-server-micro@2.21.0-alpha.2
 - apollo-server-testing@2.21.0-alpha.2
 - apollo-server@2.21.0-alpha.2
@glasser
Copy link
Member Author

glasser commented Feb 11, 2021

I published v2.21.0-alpha.2 which also bumps the dependency on graphql-tools from 4.0.0 to 4.0.8, for graphql@15 compatibility. (This mostly matters for folks with old projects who are upgrading.) Most people have probably already been running against 4.0.8 for nearly a year.

@@ -5560,7 +5587,7 @@
"requires": {
"@apollographql/apollo-tools": "^0.4.3",
"@apollographql/graphql-playground-html": "1.6.26",
"@types/graphql-upload": "^8.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for adding this note in the fork's README, I was unsure about this change.
https://github.com/apollographql/graphql-upload#readme

This fork also contains the TypeScript typings from DefinitelyTyped, so you don't have to try to combine this fork with @types/graphql-upload

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the alternative seemed pretty challenging to me (some weird tsconfig hacking...)

@@ -11,7 +11,7 @@ import {
import { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import { IncomingMessage, OutgoingMessage, ServerResponse, Server } from 'http';
import { graphqlFastify } from './fastifyApollo';
import { GraphQLOperation } from 'graphql-upload';
import type { GraphQLOperation } from '@apollographql/graphql-upload-8-fork';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure what you've done here and the corresponding change in package.json is correct, though I'm having a hard time saying with certainty. Just noting since you also had a question about it and I don't want to say "yes" without saying "I'm not totally sure".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well two people at "pretty sure" equals a "totally sure", right?

@glasser
Copy link
Member Author

glasser commented Feb 12, 2021

I'd love to hear a positive experience with this alpha from somebody who had trouble with peer dependencies before; otherwise this is ready to ship!

Note that I'm on vacation next week, so hopefully we can get this out tomorrow.

@parion
Copy link

parion commented Feb 12, 2021

Output on running npm install apollo-server graphql on npm v7.5.3

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: graphql@15.5.0
npm ERR! node_modules/graphql
npm ERR!   graphql@"*" from the root project
npm ERR!   peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-server@2.20.0
npm ERR!   node_modules/apollo-server
npm ERR!     apollo-server@"*" from the root project
npm ERR!   13 more (apollo-server-core, apollo-server-express, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"0.13.1 - 14" from graphql-upload@8.1.0
npm ERR! node_modules/apollo-server-core/node_modules/graphql-upload
npm ERR!   graphql-upload@"^8.0.2" from apollo-server-core@2.20.0
npm ERR!   node_modules/apollo-server-core
npm ERR!     apollo-server-core@"^2.20.0" from apollo-server@2.20.0
npm ERR!     node_modules/apollo-server
npm ERR!       apollo-server@"*" from the root project
npm ERR!     1 more (apollo-server-express)
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

When running npm i apollo-server@2.21.0-alpha.2, though, it successfully installs apollo-server and all dependent packages. I actually came across this PR when researching why I was receiving peer-dependency issues, so happy to report it works! 😄

 - apollo-server-azure-functions@2.21.0
 - apollo-server-cloud-functions@2.21.0
 - apollo-server-cloudflare@2.21.0
 - apollo-server-core@2.21.0
 - apollo-server-express@2.21.0
 - apollo-server-fastify@2.21.0
 - apollo-server-hapi@2.21.0
 - apollo-server-integration-testsuite@2.21.0
 - apollo-server-koa@2.21.0
 - apollo-server-lambda@2.21.0
 - apollo-server-micro@2.21.0
 - apollo-server-testing@2.21.0
 - apollo-server@2.21.0
@glasser
Copy link
Member Author

glasser commented Feb 12, 2021

Great, one positive experience is good for me (especially for a release with no code changes). Publishing!

@glasser glasser merged commit 8fd553b into main Feb 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants