-
Notifications
You must be signed in to change notification settings - Fork 2k
Version 5 #7515
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
Conversation
✅ Deploy Preview for apollo-server-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
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. |
packages/server/package.json
Outdated
| "@apollo/utils.logger": "^3.0.0", | ||
| "@apollo/utils.usagereporting": "^3.0.0", | ||
| "@apollo/utils.withrequired": "^3.0.0", | ||
| "@graphql-tools/schema": "^9.0.0", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 👍
* Unify v4/v5 docs (migration guide mostly) * Restore `status400ForVariableCoercionErrors` option with proper messaging
Happily, if you're using Node v24, the instructions are very easy!
As per https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping This is slightly different from `@tsconfig/node20`; see tsconfig/bases#308
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
Dealing with this is being tracked in #8089
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]>
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]>
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
SupportNot doing this: just bumping minimum graphql version.graphqlv17 instead of v16. (Bumping the minimum version rather than supporting both will allow us to take advantage of newgraphqlAPIs.)@as-integrations/express4package 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)@as-integrations/express5package supporting Express v5. (This will also work with Apollo Server v4.) See express5 #8053 for some inspiration.@apollo/server/express4@tsconfig/node20directly, though that also affectsmodule,moduleResolution, andskipLibCheck.)@apollo/gatewayv0 (mostly just stop running smoke tests that types check against it).Take advantage of dependency changes
node-fetchdependency; switch defaultfetchimplementation to be Node's built-infetchfetchnode-abort-controllerdependency in favor of Node's built-inAbortControllerReimplementnot using GraphQL v17hideSchemaDetailsFromClientErrorsin terms of newhideSuggestionsgraphqloptionReplace hackynot using GraphQL v17isBadUserInputGraphQLErrorby using newvalidateExecutionArgsgraphqlfunctionConsider adding "max fields per operation" option/plugin taking advantage ofnot using GraphQL v17graphqlv17's AbortSignal functionality (can be shipped in a post-5.0.0 minor release or as a separate package too)Miscellaneous changes
precomputedNoncelanding 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.)status400ForVariableCoercionErrorsconfiguration 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
startStandaloneServerto not use Express