UseQuery, generate aliases for the query cache key in initialdata #5939
Unanswered
chrisl8888
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to generate multiple query keys for the same object with useQuery initialData?
E.g.
Car models: psuedocode
queryKey.setQueryData(['Tesla', car.userid], car)
queryKey.setQueryData(['Tesla', car.customerName], car)
I'm doing this because after I do a post, the post response is missing data returned back from a mutation and would like to retrieve this again.
Or is there a possibile workaround for this ?
If not would this be something to be addressed in the query-key package?
Beta Was this translation helpful? Give feedback.
All reactions