fix: make queryFn optional again#8176
Merged
TkDodo merged 2 commits intoTanStack:mainfrom Oct 15, 2024
juliusmarminge:optional-queryFn
Merged
fix: make queryFn optional again#8176TkDodo merged 2 commits intoTanStack:mainfrom juliusmarminge:optional-queryFn
TkDodo merged 2 commits intoTanStack:mainfrom
juliusmarminge:optional-queryFn
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 1fc90b7. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8176 +/- ##
===========================================
+ Coverage 45.41% 81.84% +36.43%
===========================================
Files 200 26 -174
Lines 7456 358 -7098
Branches 1696 97 -1599
===========================================
- Hits 3386 293 -3093
+ Misses 3694 56 -3638
+ Partials 376 9 -367
|
TkDodo
approved these changes
Oct 15, 2024
This was referenced Nov 7, 2024
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #8180
#8082 broke trpc's
useSuspenseQueriesas it madequeryFnrequired.queryFnis optional in all other types and should remain so. We set this param internally and the users should not provide it themselves.For example, this should be possible:
most notably
optionsdoesn't have aqueryFnspecified since that's set by trpc internally.this PR fixes the issue by making the override still optional, as it is in the base type
PR on trpc: trpc/trpc#6118 (see patch here: https://github.com/trpc/trpc/pull/6118/files#diff-996d92a63ec784c3182c4cfccc74574ce428ba741562b83cffa4fed1999539e1)
--
not sure how i should add tests in RQ for this