fix({react,preact}-query): default 'TData' of infinite query options to 'InfiniteData' - #11147
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 (7)
🚧 Files skipped from review as they are similar to previous changes (7)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe React and Preact infinite-query option types now default ChangesInfinite query type defaults
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This narrowly scoped change aligns infinite-query option defaults with the paginated data returned by the hooks; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
…to 'InfiniteData'
20a9657 to
0f4fd04
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
View your CI Pipeline Execution ↗ for commit 877090f
☁️ Nx Cloud last updated this comment at |
🎯 Changes
UseInfiniteQueryOptionsdefaultsTDatatoTQueryFnData, butuseInfiniteQuerydefaults it toInfiniteData<TQueryFnData>. Passing an options object typed with the defaults into the hook therefore resolvesdatato a single page instead of the paginated shape, and every wrapper has to spell out the generics by hand.Both defaults now agree. Same change for
UseSuspenseInfiniteQueryOptions, and for the preact-query copies of these types.The same mismatch exists in vue-query, solid-query, svelte-query and angular-query-experimental, and one layer down in query-core's
InfiniteQueryObserverOptions. I left those out to keep this scoped to the reported case, but happy to follow up if you want them aligned too.Fixes #11143
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
Tests