From 4e210318a74db9283cd91a754b9df260ad589e17 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Tue, 14 Oct 2025 12:32:42 -0600 Subject: [PATCH 1/5] Add spec version to alpha.9 handler --- src/incremental/handlers/graphql17Alpha9.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/incremental/handlers/graphql17Alpha9.ts b/src/incremental/handlers/graphql17Alpha9.ts index 51ea4acc714..d6b0fe964d7 100644 --- a/src/incremental/handlers/graphql17Alpha9.ts +++ b/src/incremental/handlers/graphql17Alpha9.ts @@ -259,7 +259,10 @@ export class GraphQL17Alpha9Handler if (hasDirectives(["defer", "stream"], request.query)) { const context = request.context ?? {}; const http = (context.http ??= {}); - http.accept = ["multipart/mixed", ...(http.accept || [])]; + http.accept = [ + "multipart/mixed;incrementalDeliverySpec=graphql/incremental/v0.1", + ...(http.accept || []), + ]; request.context = context; } From 003613783055a891b706e2639d20e699cc45b58d Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Tue, 14 Oct 2025 12:33:30 -0600 Subject: [PATCH 2/5] Update size limits --- .size-limits.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.size-limits.json b/.size-limits.json index e214463c49d..793077d8d68 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,6 +1,6 @@ { - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 44752, - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 39500, - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 33897, - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27749 + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 44849, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 39477, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 33875, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27756 } From a67f028886e2179ca5df62e461c899abd51fbce0 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Tue, 14 Oct 2025 12:35:24 -0600 Subject: [PATCH 3/5] Add changeset --- .changeset/slimy-ducks-scream.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slimy-ducks-scream.md diff --git a/.changeset/slimy-ducks-scream.md b/.changeset/slimy-ducks-scream.md new file mode 100644 index 00000000000..16bfcc03b70 --- /dev/null +++ b/.changeset/slimy-ducks-scream.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Update the `accept` header used with the `GraphQL17Alpha9Handler` to `multipart/mixed;incrementalDeliverySpec=graphql/incremental/v0.1` to ensure the newest incremental delivery format is requested. From 5db41bb5a8b26fdfbf9246045f03b868115374bd Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Tue, 14 Oct 2025 12:40:56 -0600 Subject: [PATCH 4/5] Update tests --- src/link/http/__tests__/HttpLink.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/link/http/__tests__/HttpLink.ts b/src/link/http/__tests__/HttpLink.ts index 69792fab1c3..a95187333ba 100644 --- a/src/link/http/__tests__/HttpLink.ts +++ b/src/link/http/__tests__/HttpLink.ts @@ -1636,7 +1636,7 @@ describe("HttpLink", () => { headers: { "content-type": "application/json", accept: - "multipart/mixed,application/graphql-response+json,application/json;q=0.9", + "multipart/mixed;incrementalDeliverySpec=graphql/incremental/v0.1,application/graphql-response+json,application/json;q=0.9", }, }) ); @@ -1744,7 +1744,7 @@ describe("HttpLink", () => { headers: { "content-type": "application/json", accept: - "multipart/mixed,application/graphql-response+json,application/json;q=0.9", + "multipart/mixed;incrementalDeliverySpec=graphql/incremental/v0.1,application/graphql-response+json,application/json;q=0.9", }, }) ); From 4b6a9a5c62a4b1717d089db9adcb56e092fc118c Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Mon, 20 Oct 2025 18:30:48 -0600 Subject: [PATCH 5/5] Update to final value of header --- .changeset/slimy-ducks-scream.md | 2 +- .size-limits.json | 4 ++-- src/incremental/handlers/graphql17Alpha9.ts | 3 ++- src/link/http/__tests__/HttpLink.ts | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.changeset/slimy-ducks-scream.md b/.changeset/slimy-ducks-scream.md index 16bfcc03b70..66187335a80 100644 --- a/.changeset/slimy-ducks-scream.md +++ b/.changeset/slimy-ducks-scream.md @@ -2,4 +2,4 @@ "@apollo/client": patch --- -Update the `accept` header used with the `GraphQL17Alpha9Handler` to `multipart/mixed;incrementalDeliverySpec=graphql/incremental/v0.1` to ensure the newest incremental delivery format is requested. +Update the `accept` header used with the `GraphQL17Alpha9Handler` to `multipart/mixed;incrementalSpec=v0.2` to ensure the newest incremental delivery format is requested. diff --git a/.size-limits.json b/.size-limits.json index 793077d8d68..6671f69ef70 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,6 +1,6 @@ { - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 44849, - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 39477, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 44831, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 39452, "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 33875, "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27756 } diff --git a/src/incremental/handlers/graphql17Alpha9.ts b/src/incremental/handlers/graphql17Alpha9.ts index d6b0fe964d7..ee671c18504 100644 --- a/src/incremental/handlers/graphql17Alpha9.ts +++ b/src/incremental/handlers/graphql17Alpha9.ts @@ -259,8 +259,9 @@ export class GraphQL17Alpha9Handler if (hasDirectives(["defer", "stream"], request.query)) { const context = request.context ?? {}; const http = (context.http ??= {}); + // https://specs.apollo.dev/incremental/v0.2/ http.accept = [ - "multipart/mixed;incrementalDeliverySpec=graphql/incremental/v0.1", + "multipart/mixed;incrementalSpec=v0.2", ...(http.accept || []), ]; diff --git a/src/link/http/__tests__/HttpLink.ts b/src/link/http/__tests__/HttpLink.ts index a95187333ba..53586aeb351 100644 --- a/src/link/http/__tests__/HttpLink.ts +++ b/src/link/http/__tests__/HttpLink.ts @@ -1636,7 +1636,7 @@ describe("HttpLink", () => { headers: { "content-type": "application/json", accept: - "multipart/mixed;incrementalDeliverySpec=graphql/incremental/v0.1,application/graphql-response+json,application/json;q=0.9", + "multipart/mixed;incrementalSpec=v0.2,application/graphql-response+json,application/json;q=0.9", }, }) ); @@ -1744,7 +1744,7 @@ describe("HttpLink", () => { headers: { "content-type": "application/json", accept: - "multipart/mixed;incrementalDeliverySpec=graphql/incremental/v0.1,application/graphql-response+json,application/json;q=0.9", + "multipart/mixed;incrementalSpec=v0.2,application/graphql-response+json,application/json;q=0.9", }, }) );