-
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
Conversation
useQuery
in place of usePromise
for EDA subsetting and visualizationsuseQuery
in place of usePromise
for EDA subsetting and visualizations
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:
const enabled = queryKey.every((val) => val != null); |
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.
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 started testing with a clinepi site, and ran into an issue with a MultiFilter. See details below.
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:
const enabled = queryKey.every((val) => val != null); |
Hi @dmfalke thank you for the review. |
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 this all looks good.
At some point, we might want to consider moving QueryClientProvider
to a more central place, such as the Root
component in wdk-client. However, this raises some questions about how to properly deal with dependencies like this, across packages.
cacheTime
inuseQuery
to 60 seconds (in ms) for scatterplot?) - default is 5 minutes