github apollographql/apollo-server @apollo/server-integration-testsuite@6.0.0-alpha.0

pre-releaseone hour ago

Major Changes

  • #8272 66bd442 Thanks @glasser! - Previously, this published package contained copies compiled both as ECMAScript modules (ESM) and as CommonJS. It is now published only as ESM, without a CommonJS build. All supported versions of Node.js allow you to require() ESM code from CommonJS code.

    Even though Node.js's own module loader should be able to use this module from CommonJS code without configuration changes, other ways of running code might need small adjustments. Specifically, some configurations of Jest and TypeScript may need changes; see the migration guide for details.

    While Apollo Server v6.0.0 is ESM-only, it does not yet depend on any other ESM-only package at runtime. (This will make it easier to change our minds and return to publishing CommonJS builds if this change was premature.) However, we may choose to start depending on ESM-only packages in a future minor release.

  • #8246 89486b2 Thanks @glasser! - Require GraphQL.js v17. The graphql peer dependency is now ^17.1.0; Apollo Server 6 does not support GraphQL.js v16 (nor does it support pre-release versions of GraphQL.js v17, as Apollo Server 5 did experimentally). Before upgrading, read the GraphQL.js v16 to v17 upgrade guide for changes to GraphQL.js itself.

    Incremental delivery (@defer and @stream) now works natively without needing to install an alpha version of GraphQL.js. Clients must request incremental delivery with the accept: multipart/mixed; incrementalSpec=v0.2 HTTP header.

    Other packages that peer-depend on graphql must also accept v17; in particular, use @apollo/gateway v2.14.5 or later and @apollo/subgraph v2.16.0 or later.

  • #8247 069d645 Thanks @glasser! - Remove support for the legacy incremental delivery format (accept: multipart/mixed; deferSpec=20220824), along with the legacyExperimentalExecuteIncrementally constructor option. Operations that use @defer or @stream from clients that only accept that format now receive a 406 Not Acceptable error; clients should send accept: multipart/mixed; incrementalSpec=v0.2 instead.

    The GraphQLExperimental*Alpha2 and GraphQLExperimental*Alpha9 types are no longer exported from @apollo/server. GraphQLResponseBody and the willSendSubsequentPayload plugin hook now use the FormattedInitialIncrementalExecutionResult and FormattedSubsequentIncrementalExecutionResult types exported from graphql (which have the same shape as the removed Alpha9 types). GraphQLResponseBody's subsequentResults is now the AsyncGenerator that graphql returns (FormattedExperimentalIncrementalExecutionResults['subsequentResults']) rather than a plain AsyncIterable, so you can call return() on it.

  • #8273 3d0cc56 Thanks @glasser! - The integration test suite no longer depends on Jest, and the jest and @jest/globals peer dependencies are gone. Instead, defineIntegrationTestSuite now takes a "test runner" as its first argument, which is an object that defines a few functions like describe and it. You can pass the @jest/globals or vitest module objects as test runners for Jest or Vitest, pass new NodeTestRunner() (exported here) to work with Node's built-in node --test, or define your own runner.

  • #8244 0976350 Thanks @glasser! - Drop support for Node.js v20, which reached end-of-life on April 30, 2026. Apollo Server 6 requires Node.js v22.18.0 or later (engines.node: ">=22.18").

    Apollo Server 6 also adopts a new policy for Node.js support: once a Node.js major version reaches end-of-life, Apollo Server may drop support for it with a minor release rather than a major release. Such a change will be called out in the changelog. This policy only applies to Node.js versions, not other dependencies.

    Apollo Server is now compiled with TypeScript's es2024 target and lib (every supported Node.js version implements ES2024).

Minor Changes

  • #8251 7bafc03 Thanks @glasser! - Requests can now carry an AbortSignal. Web framework integrations can optionally include one in HTTPGraphQLRequest, and plugins can set or replace requestContext.request.http.signal in requestDidStart (for example, to combine the integration's signal with AbortSignal.timeout()). If a signal is present, Apollo Server checks it at several points while processing the request (such as before parsing, validation, and execution) and forwards it to GraphQL.js execution. Execution as a whole will stop early if the signal fires, and individual resolvers can access it via info.getAbortSignal() if they want to abort their own work. If the signal fires, requests will end with a new error code, REQUEST_ABORTED (for an incremental delivery response whose initial payload has already been sent, each still-pending deferred fragment or stream completes with that error).

    startStandaloneServer provides an AbortSignal and fires it if the client disconnects before the response is finished.

Patch Changes

Don't miss a new apollo-server release

NewReleases is sending notifications on new releases.