fix(vue-query): unwrap getter function for fetchQuery options#11108
fix(vue-query): unwrap getter function for fetchQuery options#11108MaNaN1803 wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesQueryClient option handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/vue-query/src/queryClient.ts`:
- Around line 307-320: Widen the getter overload return types in
QueryClient.fetchQuery and QueryClient.invalidateQueries to MaybeRefDeep of
their respective options or filters, matching cloneDeepUnref’s supported nested
refs. In fetchQuery, remove the as any cast when passing unwrappedOptions to
super.fetchQuery; apply the corresponding invalidateQueries type changes as
well.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0dc7e1d8-b442-4866-a15e-410bb5055d1f
📒 Files selected for processing (1)
packages/vue-query/src/queryClient.ts
Fixes #11102
🎯 Changes
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
New Features
fetchQueryoptions through a function, including reactive values.Bug Fixes
invalidateQueriesoption handling for more predictable reactive value support.