Skip to content

Prevent query from returning cached data when using skipToken #1492

Answered by phryneas
JosNun asked this question in Q&A
Discussion options

You must be logged in to vote

Not at the moment. You can only do something like

const arg = routeParams.code ? { code: routeParams.code }  : skipToken
const { data } = useGetItemByCodeQuery(arg);
const myData = arg == skipToken ? undefined : data

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JosNun
Comment options

Answer selected by JosNun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants