-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(react-query): remove async
from queryFn
#8232
test(react-query): remove async
from queryFn
#8232
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 0f6fe6a. 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 #8232 +/- ##
=========================================
+ Coverage 0 81.79% +81.79%
=========================================
Files 0 26 +26
Lines 0 357 +357
Branches 0 96 +96
=========================================
+ Hits 0 292 +292
- Misses 0 56 +56
- Partials 0 9 +9
|
This PR removes the
async
keyword fromqueryFn
which is raising above warning.Explanation
I traced back to its original type:
query/packages/query-core/src/types.ts
Lines 50 to 54 in c61ff1e
The
QueryFunction
type allows return type ofT
orPromise<T>
. In our caseT
is the type ofinitialData
, which is{ example: boolean } | undefined
. No Promise, no async..