Skip to content

chore(deps): update @apollo/client to 3.14.1#349

Merged
CataldoMazzilli merged 2 commits into
develfrom
chore/deps-apollo-client-update-2026-06-03
Jun 4, 2026
Merged

chore(deps): update @apollo/client to 3.14.1#349
CataldoMazzilli merged 2 commits into
develfrom
chore/deps-apollo-client-update-2026-06-03

Conversation

@CataldoMazzilli

Copy link
Copy Markdown
Member

Summary

Updates @apollo/client 3.10.83.14.1.

This bump was split out of the bundled runtime-dependencies PR (#348) because, unlike the other runtime packages, it requires source changes to adapt to breaking type and API changes introduced across the 3.11–3.14 releases.

Type changes

  • cache.modify / Modifier<T>Modifier<T> now returns DeepPartial<T> (previously T), and cache.modify infers its Entity type from the field modifiers. This broke the list-field modifiers.
    • Annotated the call sites with the explicit field shape: cache.modify<{ findTasks: Reference[] }>(...) (NewTaskBoard.tsx, useTrashAction.ts, RemindersManager.test.tsx).
    • Narrowed the helpers in cacheUtils.ts from Modifier<readonly Reference[] | Reference> to Modifier<readonly Reference[]> (the single-Reference branch is invalid for a list field's return type).
  • MockedResponse — now declared MockedResponse<out TData, out TVariables> with result: FetchResult<Unmasked<TData>>. The local Mock interface can no longer be widened to Mock<Record<string, unknown>> (the out covariance can't be propagated through Unmasked). Typed the test helper's mocks option as MockedResponse[] — exactly what MockedProvider accepts — instead of the local Mock[].

Deprecations

These were emitted as console.warn and broke the vitest-fail-on-console test setup, so they had to be migrated:

  • ApolloClient({ connectToDevTools })devtools: { enabled } (apollo/index.ts).
  • useLazyQuery(doc, { variables }) → variables are now passed to the returned execute function instead (RemindersManager.tsx).

Verification

  • pnpm type-check
  • pnpm lint ✅ (only the 2 pre-existing import/no-extraneous-dependencies warnings in testUtils.tsx)
  • pnpm test ✅ — 229/229
  • pnpm build

Changelog

Release notes: https://github.com/apollographql/apollo-client/releases (3.11.x → 3.14.1)


Split from #348 (bundled runtime dependencies update).

🤖 Generated with Claude Code

Bump @apollo/client 3.10.8 -> 3.14.1 (separated from the bundled runtime
deps update because it requires source changes for breaking type/API
changes introduced in the 3.11-3.14 line).

Type changes:
- Modifier<T> now returns DeepPartial<T> and cache.modify infers the
  Entity from the field modifiers; annotate cache.modify<{ findTasks:
  Reference[] }>() at the call sites and narrow the list modifiers in
  cacheUtils to Modifier<readonly Reference[]>.
- MockedResponse is now declared MockedResponse<out TData, out TVariables>
  with result: FetchResult<Unmasked<TData>>; the local Mock interface can
  no longer be widened to Mock<Record<string, unknown>>. Type the test
  helper 'mocks' option as MockedResponse[] (what MockedProvider accepts).

Deprecations (were emitted as console.warn and broke the
vitest-fail-on-console test setup):
- ApolloClient 'connectToDevTools' -> 'devtools: { enabled }'.
- useLazyQuery 'variables' option -> pass variables to the returned
  execute function instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ient-update-2026-06-03

# Conflicts:
#	pnpm-lock.yaml
@sonarqube-zextras

Copy link
Copy Markdown

@CataldoMazzilli CataldoMazzilli merged commit 9350980 into devel Jun 4, 2026
3 checks passed
@CataldoMazzilli CataldoMazzilli deleted the chore/deps-apollo-client-update-2026-06-03 branch June 4, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants