Closed maximilianoertel closed 1 month ago
Visit the preview URL for this PR (updated for commit 2b06b5c):
https://roar-staging--pr791-ref-318-query-compos-iu8doqev.web.app
(expires Thu, 19 Sep 2024 10:30:34 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: 2631e9c58fd0104ecbfddd72a62245ddac467460
Passed #6368
•
2b06b5c1b2: E2E Tests for PR 791 "Fix reactivity in TanStack query composables" from commit ...
Project |
roar-dashboard-e2e
|
Branch Review |
ref/318/query-composables-reactivity-fix
|
Run status |
Passed #6368
|
Run duration | 05m 34s |
Commit |
2b06b5c1b2: E2E Tests for PR 791 "Fix reactivity in TanStack query composables" from commit ...
|
Committer | Maximilian Oertel |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
26
|
View all changes introduced in this branch ↗︎ |
Status | Category | Percentage | Covered / Total |
---|---|---|---|
🔵 | Lines | 2.93% | 224 / 7629 |
🔵 | Statements | 2.83% | 238 / 8396 |
🔵 | Functions | 3.47% | 65 / 1868 |
🔵 | Branches | 1.6% | 73 / 4548 |
Proposed changes
This PR fixes some reactivity issues that were identified across the TanStack query composables. The implemented changes ensure proper reactivity for queries that depend on data from a store or another query.
To reduce code duplication, this PR introduces a
computeQueryOverrides
which is responsible for:isQueryEnabled
value based on a number of provided conditionsqueryOptions
object without the originalenabled
property to avoid accidental overriding of the internally computed valueAdditionally, this PR both overhauls existing and introduces new unit tests. Further unit tests will be introduced in subsequent PRs.
Types of changes
Checklist
Justification of missing checklist items
n/a
Further comments
n/a
Ref yeatmanlab/roar#318