fix(vue-query): accept 'UseQueryOptions' in 'query', 'ensureQueryData', 'fetchQuery' and 'prefetchQuery' again #11644
Closedmaximilian-hammerl(GitHub profile, opens in a new tab)wants to merge 2 commits into
main fromrefs/pull/11644/headopened View on GitHubDogPawHat reviewed
@@ -314,2 +352,20 @@352+ TQueryKey,353+ TPageParam354+ >355+ >356+ | UseQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>,314357 ): Promise<TData> {315- return super.query(cloneDeepUnref(options))358+ return super.query(359+ cloneDeepUnref(360+ options as MaybeRefDeep<361+ QueryExecuteOptions<362+ TQueryFnData,363+ TError,364+ TData,365+ TQueryData,366+ TQueryKey,367+ TPageParam368+ >369+ >,370+ ),371+ )
Sign in to join this conversation.
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: TanStack/query/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
71823aa9-7c93-440b-a19d-e6fa84cdb5cf📥 Commits
Reviewing files that changed from the base of the PR and between 9ff2ee3bbd02c3203d62e8bd777aacf860bcd18b and 2c6142fd3d4347ce538438ebb24b309f1c14f116.
📒 Files selected for processing (3)
.changeset/vue-query-client-use-query-options.mdpackages/vue-query/src/__tests__/queryClient.test-d.tspackages/vue-query/src/queryClient.tsIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
The Vue
QueryClientrestores deprecatedUseQueryOptionsoverloads forquery,ensureQueryData,fetchQuery, andprefetchQuery. The methods continue to deep-unref options before delegation. Type tests cover reactive options and result types.Changes#
Vue QueryClient option compatibility
packages/vue-query/src/queryClient.ts,packages/vue-query/src/__tests__/queryClient.test-d.ts,.changeset/vue-query-client-use-query-options.mdUseQueryOptionsoverloads and accept those options in their implementations. Type tests check reactive options, promise result types, and selected-data behavior. A patch changeset records the compatibility restoration.Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
sukvvonMerge Risk: ⚪ Minimal · up to
2c614No actionable merge-blocking issue is established. Run the type tests as part of normal validation before merging.
Security Architecture Review#
Security architecture risk: 🔵 Low · up to
2c614The restored overloads use the existing execution path, but they also accept an enabled option that does not stop an imperative call from fetching. This is a conditional risk for callers that mistake it for an execution guard; no privileged exposure was established.
Retained concerns
Security review details
Security Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
#11639].QueryClientaddsUseQueryOptionsoverloads forensureQueryData,fetchQuery, andprefetchQuery. It also adds the relatedqueryoverload…queryoverload uses the sameUseQueryOptionscompatibility fix as the directly requi…✨ 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.
❤️ Share