Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

🐛 Remove unnecessary initialData from useQuery calls #1940

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

rszwajko
Copy link
Collaborator

@rszwajko rszwajko commented Jun 5, 2024

Initial data is persisted in cache which results in:

  1. isLoading flag always false
  2. with custom staleTime, delaying first fetch until cache expires

Initial data is persisted in cache which results in:
1. isLoading flag always false
2. with custom staleTime, delaying first fetch until cache expires

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@rszwajko rszwajko requested review from sjd78 and ibolton336 June 5, 2024 11:04
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.17%. Comparing base (b654645) to head (32e9679).
Report is 154 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1940      +/-   ##
==========================================
+ Coverage   39.20%   42.17%   +2.97%     
==========================================
  Files         146      166      +20     
  Lines        4857     5318     +461     
  Branches     1164     1293     +129     
==========================================
+ Hits         1904     2243     +339     
- Misses       2939     3059     +120     
- Partials       14       16       +2     
Flag Coverage Δ
client 42.17% <100.00%> (+2.97%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rszwajko
Copy link
Collaborator Author

rszwajko commented Jun 5, 2024

@sjd78 @ibolton336
The bug was found when testing #1939 - isFetchingApplications was always false which breaks the the linking functionality.

Btw note that we use a different meaning of isFetching then React Query - under the hood it's translated to isLoading (which is a different state).

@sjd78 sjd78 added this to the v0.5.0 milestone Jun 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants