-
Looking at the client api if I have some data stored with key client.getQueryData(["x", 1]); // this returns data
client.getQueryData(["x"]); // this returns undefined
client.getQueriesData(["x", 1]); // this returns data in tuple
client.getQueriesData(["x"]); // this returns data in tuple Why |
Beta Was this translation helpful? Give feedback.
Answered by
vossmalte
Jan 13, 2024
Replies: 1 comment 8 replies
-
Imagine: you have data for
|
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
TkDodo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Imagine: you have data for
['x',1]
and['x',2]
and['x']
.What result expect do you expect from
client.getQueryData(["x"]);
?getQueriesData
does accept a partial key as being part of a filter.On the other hand,
getQueryData
looks up a specific cache entry (and if it does not exist, it isundefined
).