How to access the queryClient outside the provider? e.g. to invalidate queries in Cypress tests #2727
Answered
by
TkDodo
mrmartineau
asked this question in
Q&A
-
Is it possible to access my app's In my some of my Cypress tests I fetch or mutate some data but then I'd like to invalidate all/part of the Is that possible? I have tried importing the "same" ℹ️ I include these fetch/mutations in my tests merely to allow me to bypass convoluted steps that user's would normally take in the app which already have Cypress tests. |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Sep 28, 2021
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mrmartineau
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/69344045/how-to-access-the-react-query-queryclient-outside-the-provider-e-g-to-invali