RTK Query - Handle result global? #1392
Unanswered
wuifdesign
asked this question in
Q&A
Replies: 1 comment 1 reply
-
For something like that, you would wrap your baseQuery in a custom function. You can find an example here: https://redux-toolkit.js.org/rtk-query/usage/customizing-queries#automatic-re-authorization-by-extending-fetchbasequery |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Is there a way to handle the result of every endpoint inside an
createApi
.For example:
authenticated: false
and show a login overlay whenever any of the endpoints returns a 401.notifications
key, i want to display these notifications as messages.It seams like this is only possible if i add this to each implementation of any of these endpoints.
Beta Was this translation helpful? Give feedback.
All reactions