-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use useQuery
in place of usePromise
for EDA subsetting and visualizations
#1228
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1619749
WIP but not working
bobular 6a7f6d0
react-query working now for subsetting
bobular 95aaead
basic approach working but still WIP
bobular 226d775
missing dep
bobular b3c0f59
another missing dep
bobular 72bac14
Merge remote-tracking branch 'origin/main' into 1103-react-query-retr…
bobular db8aa66
improve comments
bobular d5a2c6d
solve userdb PATCH update issue with referential stability
bobular deca1d9
spinner behaviour hopefully fixed
bobular cd3e13e
cancel variable works and old data is flushed when appropriate
bobular 1a3ede4
add cacheTime argument to useCachedPromise for the future
bobular 4484b0c
map supporting plots now behave correctly
bobular a6afabf
rename to dataRequestDeps and document it
bobular 5fd09c8
done barplot
bobular b782daf
remove commented deps
bobular a098e43
standardise throw messages
bobular 12d43bd
boxplot
bobular db32ab4
fix mbio boxplot behaviour
bobular 541b59a
started with lineplot
bobular b840c6e
fix oopsie with unique vars check
bobular 0e60f89
fixed lineplot incompatible settings banner behaviour and used variab…
bobular 03d39ec
take care of floating plot overlay and remove commented deps
bobular bf3c641
Merge remote-tracking branch 'origin/main' into 1103-react-query-retr…
bobular 9994ca2
mosaics done
bobular f66f3c1
scatterplot
bobular 1267fa7
Merge branch 'main' into 1103-react-query-retrofit
bobular 65004b3
fix dependency warnings for histogram
bobular c29fde8
fix broken dependencies
bobular deff652
fix multifilter when there is no filter applied to the variable
bobular 0415b50
Merge remote-tracking branch 'origin/main' into 1103-react-query-retr…
bobular File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { QueryClient } from '@tanstack/react-query'; | ||
|
||
export const queryClient = new QueryClient({ | ||
defaultOptions: { | ||
queries: { | ||
// This is similar behavior to our custom usePromise hook. | ||
// It can be overridden on an individual basis, if needed. | ||
keepPreviousData: true, | ||
// We presume data will not go stale during the lifecycle of an application. | ||
staleTime: Infinity, | ||
// Do not attempt to retry if an error is encountered | ||
retry: false, | ||
// Do not referch when the browser tab is focused again | ||
refetchOnWindowFocus: false, | ||
}, | ||
}, | ||
}); |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All "MultiFilter" variables appear to be broken. An example can be found with a clinepi-site (using qa.clinepi): http://localhost:8080/a/app/workspace/analyses/DS_841a9f5259/new/variables/PCO_0000024/ENVO_00003064.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because one of the deps is
null
ish:web-monorepo/packages/libs/eda/src/lib/core/hooks/cachedPromise.ts
Line 24 in 65004b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dmfalke - I have fixed this now.
I did test it but I must have already checked some checkboxes before deploying the useQuery.