Skip to content

feat: update tanstack query version to the latest#5018

Open
2wheeh wants to merge 7 commits intowevm:mainfrom
2wheeh:feat/update-query
Open

feat: update tanstack query version to the latest#5018
2wheeh wants to merge 7 commits intowevm:mainfrom
2wheeh:feat/update-query

Conversation

@2wheeh
Copy link
Copy Markdown
Contributor

@2wheeh 2wheeh commented Mar 5, 2026

closes #4992

Background

The upstream fix (TanStack/query#10093 related to #4992) hadn't been merged for some time, so I decided to migrate @wagmi/solid to the use* APIs directly and bump all TanStack Query packages to the latest.

During the update, I found that the generics had already diverged between wagmi's type wrappers and TanStack Query's latest types.

Changes

  1. @tanstack/*-query version bumps
  2. removes dropped TQueryData from InfiniteQueryObserverOptions and all wrapper types that forwarded it
  3. MutateOptions callback signature change:
// Before (v5.49.x)
onSuccess?: (data, variables, context: TContext) => void
// After (v5.90.x)
onSuccess?: (data, variables, onMutateResult: TOnMutateResult | undefined, context: MutationFunctionContext) => void

The old context (return value of onMutate) was renamed to onMutateResult, and a new context, type of which is MutationFunctionContext, was added as an extra param.

  1. client: QueryClient added to QueryFunctionContext

Updated getFeeHistory.test.ts which manually constructs the context object.

  1. Solid Query: create*use* API migration

Questions

  • Should we bump peerDeps to >=5.90.0 across the board to match the versions we're actually testing against?
  • Should we also rename the context generic parameter to onMutateResult in wagmi's type wrappers to align with the upstream naming? (easy but quite a lot of changes)

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: e356dd2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
wagmi Minor
@wagmi/solid Minor
@wagmi/core Minor
@wagmi/vue Minor
@wagmi/connectors Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 5, 2026

@2wheeh is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@2wheeh 2wheeh changed the title feat: update tanstack query version to the lastest feat: update tanstack query version to the latest Mar 5, 2026
@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 5, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​tanstack/​query-core@​5.49.1 ⏵ 5.90.2092 -810076 +2100 +3100
Updated@​tanstack/​solid-query@​5.49.1 ⏵ 5.90.2399 +810087 +1596 +1100
Updated@​tanstack/​react-query@​5.49.2 ⏵ 5.90.219910088 +1100 +3100
Updated@​tanstack/​vue-query@​5.49.1 ⏵ 5.92.999100100 +396 +1100
Updatedviem@​2.46.3 ⏵ 2.10.8100 +2100100 +197100
Updatedviem@​2.46.3 ⏵ 2.44.49810010098100
Updatedviem@​2.46.3 ⏵ 2.44.099 +210010098 +1100

View full report

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 5, 2026

Open in StackBlitz

@wagmi/cli

npm i https://pkg.pr.new/@wagmi/cli@5018

@wagmi/connectors

npm i https://pkg.pr.new/@wagmi/connectors@5018

@wagmi/core

npm i https://pkg.pr.new/@wagmi/core@5018

create-wagmi

npm i https://pkg.pr.new/create-wagmi@5018

wagmi

npm i https://pkg.pr.new/wagmi@5018

@wagmi/solid

npm i https://pkg.pr.new/@wagmi/solid@5018

@wagmi/vue

npm i https://pkg.pr.new/@wagmi/vue@5018

commit: e356dd2

@2wheeh 2wheeh marked this pull request as draft March 5, 2026 16:16
@2wheeh 2wheeh force-pushed the feat/update-query branch from 314dc62 to 13d9887 Compare March 5, 2026 16:58
@2wheeh 2wheeh marked this pull request as ready for review March 5, 2026 17:04
@2wheeh 2wheeh marked this pull request as draft March 6, 2026 14:42
@2wheeh 2wheeh force-pushed the feat/update-query branch 4 times, most recently from acaaf3e to a59e1bb Compare March 7, 2026 02:10
@2wheeh 2wheeh marked this pull request as ready for review March 7, 2026 02:25
@2wheeh
Copy link
Copy Markdown
Contributor Author

2wheeh commented Apr 7, 2026

will resolve conflicts soon this week

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