apollo-server icon indicating copy to clipboard operation
apollo-server copied to clipboard

Version 5

Open trevor-scheer opened this issue 2 years ago • 9 comments

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

  • [x] Drop support for Node.JS v14 (EOL April 2023) and v16 (EOL September 2023)
  • [x] Drop support for Node.JS v18 (EOL April 2025)
  • [x] Explicitly support Node.JS v22
  • [x] 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.)
  • [x] Release new @as-integrations/express4 package based on v4's @apollo/server/express4 (see #7928)
  • [x] Release new @as-integrations/express5 package supporting Express v5. (This will also work with Apollo Server v4.) See #8053 for some inspiration.
  • [x] 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.)
  • [x] 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.

Take advantage of dependency changes

  • [x] 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
  • [x] Drop node-abort-controller dependency in favor of Node's built-in AbortController
  • [ ] Reimplement hideSchemaDetailsFromClientErrors in terms of new hideSuggestions graphql option
  • [ ] Replace hacky isBadUserInputGraphQLError by using new validateExecutionArgs graphql function
  • [x] 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)

Miscellaneous changes

  • [x] 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.)
  • [x] 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

  • [x] Update startStandaloneServer to not use Express
  • [ ] Audit outstanding PRs to see if there are any other major-version-bump-needing ones to get in
  • [ ] 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

trevor-scheer avatar Apr 18 '23 00:04 trevor-scheer

Deploy Preview for apollo-server-docs ready!

Name Link
Latest commit bca644dd3fafbd053f4baf9259da7c96956476a8
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.

netlify[bot] avatar Apr 18 '23 00:04 netlify[bot]

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.

Latest deployment of this branch, based on commit bca644dd3fafbd053f4baf9259da7c96956476a8:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

codesandbox-ci[bot] avatar Apr 18 '23 21:04 codesandbox-ci[bot]

@Meschreiber this change won't land until at least mid-September but if you can take a look at the documentation changes at some point I would appreciate it!

trevor-scheer avatar Jul 28 '23 21:07 trevor-scheer

Is there a rough ETA for v5 by chance? It'd be great to get this, so we can get the major version graphql-tools updates

benasher44 avatar Nov 28 '23 05:11 benasher44