feat(react-query): backport mutationOptions#10368
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 2b0fe33
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Pull request overview
This PR backports a mutationOptions helper into @tanstack/react-query, aligning it with existing “options helper” utilities (like queryOptions) and adding both runtime and type-level tests to validate inference and usage.
Changes:
- Added
mutationOptionshelper with overloads to preserve strong typing (with and withoutmutationKey). - Exported
mutationOptionsfrom thereact-querypublic entrypoint. - Added runtime and type-level test coverage for the new helper, plus updated the lockfile for codemod-related dependencies.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates lockfile (notably adds new importer entries and jscodeshift-related dependencies). |
| packages/react-query/src/mutationOptions.ts | Introduces the mutationOptions helper with TS overloads. |
| packages/react-query/src/index.ts | Re-exports mutationOptions from the package entrypoint. |
| packages/react-query/src/tests/mutationOptions.types.test.tsx | Adds type-level assertions for inference/overload behavior. |
| packages/react-query/src/tests/mutationOptions.test.tsx | Adds runtime tests validating identity behavior and integration with hooks/filters. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2b0fe33:
|
326e148 to
2b0fe33
Compare
No description provided.