Skip to content

fix(vue-query/useMutation): add missing '_defaulted' omit in 'UseMutationOptionsBase' - #10215

Merged
TkDodo merged 2 commits into
TanStack:mainfrom
sukvvon:fix/vue-query-useMutation-omit-defaulted
Mar 18, 2026
Merged

fix(vue-query/useMutation): add missing '_defaulted' omit in 'UseMutationOptionsBase'#10215
TkDodo merged 2 commits into
TanStack:mainfrom
sukvvon:fix/vue-query-useMutation-omit-defaulted

Conversation

@sukvvon

@sukvvonsukvvon commented Mar 2, 2026

Copy link
Copy Markdown
Member

🎯 Changes

Add missing _defaulted omit in UseMutationOptionsBase type to align with other packages (react-query, svelte-query, solid-query, angular-query) that already omit _defaulted from MutationObserverOptions.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Bug Fixes

    • Refined useMutation public options to remove internal-only properties, improving type safety and preventing accidental reliance on implementation details.
  • Documentation

    • Added a patch release note documenting the fix.

@changeset-bot

changeset-botBot commented Mar 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 70c6b33

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

This PR includes changesets to release 2 packages
NameType
@tanstack/vue-queryPatch
@tanstack/vue-query-devtoolsPatch

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

@coderabbitai

coderabbitaiBot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This change omits the internal _defaulted property from the public UseMutationOptionsBase type in vue-query by applying OmitKeyof to MutationObserverOptions, adds the necessary import, and includes a changelog changeset documenting the patch.

Changes

Cohort / File(s)Summary
Changeset Entry
.changeset/fuzzy-chicken-listen.md
Adds a new changeset documenting a patch release that notes the _defaulted omit fix for UseMutationOptionsBase.
Vue Query Type Fix
packages/vue-query/src/useMutation.ts
Type update: UseMutationOptionsBase now uses OmitKeyof<MutationObserverOptions<...>,'_defaulted'> & ShallowOption; adds OmitKeyof import from @tanstack/query-core.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • lachlancollins
  • TkDodo

Poem

🐰 I nibbled at types with careful cheer,
_defaulted hidden, no longer near,
A gentle omit, a tidy delight,
The API gleams in soft moonlight. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check nameStatusExplanation
Title check✅ PassedThe title accurately describes the main change: adding a missing '_defaulted' omit to the UseMutationOptionsBase type in vue-query/useMutation, which aligns with the code modifications shown in the summary.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check✅ PassedThe PR description fully follows the template with all required sections completed, including clear changes explanation, checklist items marked, and release impact documented.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud

nx-cloudBot commented Mar 2, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 1fa850d

CommandStatusDurationResult
nx run-many --target=build --exclude=examples/*...✅ Succeeded<1sView ↗
nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded25sView ↗

☁️ Nx Cloud last updated this comment at 2026-03-02 18:45:03 UTC

@pkg-pr-new

pkg-pr-newBot commented Mar 2, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10215

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10215

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10215

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10215

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10215

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10215

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10215

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10215

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10215

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10215

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10215

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10215

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10215

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10215

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10215

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10215

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10215

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10215

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10215

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10215

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10215

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10215

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10215

commit: c843443

@sukvvon
sukvvon marked this pull request as ready for review March 2, 2026 18:31
@sukvvon
sukvvonforce-pushed the fix/vue-query-useMutation-omit-defaulted branch from 89613e4 to 70c6b33CompareMarch 2, 2026 18:40
@sukvvon
sukvvonforce-pushed the fix/vue-query-useMutation-omit-defaulted branch from 70c6b33 to 1fa850dCompareMarch 2, 2026 18:43
@TkDodo
TkDodo merged commit 31c1696 into TanStack:mainMar 18, 2026
6 checks passed
@github-actionsgithub-actionsBot mentioned this pull request Mar 18, 2026
@sukvvonsukvvon self-assigned this Mar 19, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@sukvvon@TkDodo