Skip to content

Conversation

@trevor-scheer
Copy link
Contributor

@trevor-scheer trevor-scheer commented Apr 18, 2023

Apollo Server 5 will be an easy upgrade focused on modernizing its dependencies.

Unlike v3 and v4, it will have a short migration guide that mostly will consist of "make sure you're running current versions of your dependencies". The only non-trivial step will be following the graphql-js v16 to v17 upgrade guide if you used any of its features that have changed.

Dependency changes

  • Drop support for Node.JS v14 (EOL April 2023) and v16 (EOL September 2023)
  • Drop support for Node.JS v18 (EOL April 2025)
  • Explicitly support Node.JS v22
  • Explicitly support Node.JS v24 (if releases are available)
  • Support graphql v17 instead of v16. (Bumping the minimum version rather than supporting both will allow us to take advantage of new graphql APIs.) Not doing this: just bumping minimum graphql version.
  • Release new @as-integrations/express4 package based on v4's @apollo/server/express4 (see Copy built-in integration with Express v4 to a standalone npm package like all other integrations; support Express v5 as well #7928)
  • Release new @as-integrations/express5 package supporting Express v5. (This will also work with Apollo Server v4.) See express5 #8053 for some inspiration.
  • Remove @apollo/server/express4
  • Republish the new integration packages as dual-build CJS/ESM
  • Update TypeScript target/lib options. (This PR currently targets es2021 instead of es2020 but we can probably make this newer, maybe by using @tsconfig/node20 directly, though that also affects module, moduleResolution, and skipLibCheck.)
  • Drop support for @apollo/gateway v0 (mostly just stop running smoke tests that types check against it).
  • Make all first-party integrations (at least Express) peer-dep on AS5 too. (tracked in Apollo Server 5 release process #8089)

Take advantage of dependency changes

  • Drop node-fetch dependency; switch default fetch implementation to be Node's built-in fetch
  • Update HTTP proxy docs for Node's built-in fetch
  • Drop node-abort-controller dependency in favor of Node's built-in AbortController
  • Reimplement hideSchemaDetailsFromClientErrors in terms of new hideSuggestions graphql option not using GraphQL v17
  • Replace hacky isBadUserInputGraphQLError by using new validateExecutionArgs graphql function not using GraphQL v17
  • Upgrade other dependencies to versions that dropped support for old Node.JS versions
  • Consider adding "max fields per operation" option/plugin taking advantage of graphql v17's AbortSignal functionality (can be shipped in a post-5.0.0 minor release or as a separate package too) not using GraphQL v17

Miscellaneous changes

  • Remove precomputedNonce landing page configuration option. (This option was introduced and subsequently deprecated in v4. Removing this configuration in v4 is strictly an improvement to the security of your landing page, and no longer exists in v5.)
  • Change default value of status400ForVariableCoercionErrors configuration option from false to true; this v3-to-v4 regression mitigation will now be enabled by default. Setting this value (to true or false) will log a deprecation warning.

Other tasks

  • Update startStandaloneServer to not use Express
  • Audit outstanding PRs to see if there are any other major-version-bump-needing ones to get in (tracked in Apollo Server 5 release process #8089)
  • Update doc site (v4 and v5 will have a shared "doc version" with minor notes where their behavior differs)
  • Update READMEs
  • Write (short!) migration guide
  • Determine and publish EOL timeline for v4

@netlify
Copy link

netlify bot commented Apr 18, 2023

Deploy Preview for apollo-server-docs ready!

Name Link
🔨 Latest commit bca644d
🔍 Latest deploy log https://app.netlify.com/sites/apollo-server-docs/deploys/64c803dd103ef70008fb68e1
😎 Deploy Preview https://deploy-preview-7515--apollo-server-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 18, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@trevor-scheer trevor-scheer marked this pull request as ready for review April 18, 2023 21:20
"@apollo/utils.logger": "^3.0.0",
"@apollo/utils.usagereporting": "^3.0.0",
"@apollo/utils.withrequired": "^3.0.0",
"@graphql-tools/schema": "^9.0.0",

Choose a reason for hiding this comment

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

We should be able to bump this to ^10.0.0 now, too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, yeah a couple major dep updates have stacked up since I started this PR that I'll get merged once I get back to it 👍

@trevor-scheer trevor-scheer requested a review from a team as a code owner July 24, 2023 21:44
glasser added 2 commits June 16, 2025 17:35
Happily, if you're using Node v24, the instructions are very easy!
@mabuyo mabuyo requested review from mabuyo June 18, 2025 14:34
mabuyo and others added 7 commits June 18, 2025 14:07
Docs review for the Proxy Configuration page for AS5!

---------

Co-authored-by: David Glasser <[email protected]>
Because we are keeping a single "v4-v5" doc site version, the migration
guide is split into a small "upgrading from v4 to v5" page and a longer
"upgrading from v3 to v5" page based on the previous v3-to-v4 page.

The recommendation in the latter page is to upgrade directly from v3 to
v5; we have no docs specific to going from v3 to v4. (This also means we
no longer have to document the recommendation to set
`status400ForVariableCoercionErrors: true`).

In the latter page, any time we describe a change that occurred between
v3 and v4, we describe it as "in Apollo Server 4+"; however, when
describing how a user will write code today, we describe it as "in
Apollo Server 5".
Remaining:
- Update docs-examples repo
- Minor version bump for graphql-js
- Come up with an EOL date for AS4
@glasser glasser mentioned this pull request Jun 25, 2025
17 tasks
@glasser glasser merged commit 100233a into main Jul 1, 2025
19 of 20 checks passed
@glasser glasser deleted the version-5 branch July 1, 2025 22:34
@github-actions github-actions bot mentioned this pull request Jul 1, 2025
glasser added a commit that referenced this pull request Jul 7, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @apollo/[email protected]

### Major Changes

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Drop
support for Node.JS v14, v16, and v20.

## @apollo/[email protected]

### Major Changes

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Drop
support for Node.JS v14, v16, and v20.

### Patch Changes

- [#8078](#8078)
[`dabe7ba`](dabe7ba)
Thanks [@renovate](https://github.com/apps/renovate)! - Support Jest v30
as well as Jest v29.

- Updated dependencies
\[[`5b26558`](5b26558),
[`100233a`](100233a),
[`100233a`](100233a),
[`100233a`](100233a),
[`100233a`](100233a)]:
    -   @apollo/[email protected]

## @apollo/[email protected]

### Major Changes

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Drop
support for Node.JS v14, v16, and v20.

### Patch Changes

- [#8076](#8076)
[`5b26558`](5b26558)
Thanks [@valters](https://github.com/valters)! - Fix some error logs to
properly call `logger.error` or `logger.warn` with `this` set. This
fixes errors or crashes from logger implementations that expect `this`
to be set properly in their methods.

- Updated dependencies
\[[`5b26558`](5b26558),
[`100233a`](100233a),
[`100233a`](100233a),
[`100233a`](100233a),
[`100233a`](100233a)]:
    -   @apollo/[email protected]

## @apollo/[email protected]

### Major Changes

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Drop
support for Node.JS v14, v16, and v20.

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Remove
`precomputedNonce` landing page configuration option

This option was introduced and subsequently deprecated in v4. Removing
this configuration in v4 is strictly an improvement to the security of
your landing page, and no longer exists in v5.

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Remove
`status400ForVariableCoercionErrors` configuration option; this
regression mitigation is now the default behavior in Apollo Server v5.

### Patch Changes

- [#8076](#8076)
[`5b26558`](5b26558)
Thanks [@valters](https://github.com/valters)! - Fix some error logs to
properly call `logger.error` or `logger.warn` with `this` set. This
fixes errors or crashes from logger implementations that expect `this`
to be set properly in their methods.

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! -
ApolloServerPluginSubscriptionCallback now takes a `fetcher` argument,
like the usage and schema reporting plugins. The default value is Node's
built-in fetch.

- Updated dependencies
\[[`100233a`](100233a)]:
    -   @apollo/[email protected]

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: David Glasser <[email protected]>
@github-actions github-actions bot mentioned this pull request Jul 16, 2025
glasser added a commit that referenced this pull request Jul 17, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @apollo/[email protected]

### Major Changes

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Drop
support for Node.JS v14, v16, and v20.

## @apollo/[email protected]

### Major Changes

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Drop
support for Node.JS v14, v16, and v20.

### Patch Changes

- [#8078](#8078)
[`dabe7ba`](dabe7ba)
Thanks [@renovate](https://github.com/apps/renovate)! - Support Jest v30
as well as Jest v29.

- Updated dependencies
\[[`5b26558`](5b26558),
[`100233a`](100233a),
[`100233a`](100233a),
[`100233a`](100233a),
[`100233a`](100233a)]:
    -   @apollo/[email protected]

## @apollo/[email protected]

### Major Changes

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Drop
support for Node.JS v14, v16, and v20.

### Patch Changes

- [#8076](#8076)
[`5b26558`](5b26558)
Thanks [@valters](https://github.com/valters)! - Fix some error logs to
properly call `logger.error` or `logger.warn` with `this` set. This
fixes errors or crashes from logger implementations that expect `this`
to be set properly in their methods.

## @apollo/[email protected]

### Major Changes

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Drop
support for Node.JS v14, v16, and v20.

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Remove
`precomputedNonce` landing page configuration option

This option was introduced and subsequently deprecated in v4. Removing
this configuration in v4 is strictly an improvement to the security of
your landing page, and no longer exists in v5.

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Remove
`status400ForVariableCoercionErrors` configuration option; this
regression mitigation is now the default behavior in Apollo Server v5.

### Patch Changes

- [#8076](#8076)
[`5b26558`](5b26558)
Thanks [@valters](https://github.com/valters)! - Fix some error logs to
properly call `logger.error` or `logger.warn` with `this` set. This
fixes errors or crashes from logger implementations that expect `this`
to be set properly in their methods.

- [#7515](#7515)
[`100233a`](100233a)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! -
ApolloServerPluginSubscriptionCallback now takes a `fetcher` argument,
like the usage and schema reporting plugins. The default value is Node's
built-in fetch.

- Updated dependencies
\[[`100233a`](100233a)]:
    -   @apollo/[email protected]

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: David Glasser <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2025
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.

8 participants