how to get the meta info in middleware #4301
Unanswered
lamhungypl
asked this question in
Q&A
Replies: 1 comment
-
No, you'll need to do some combination of existence checks and type guards. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hello folks, I'm using RtkQuery with endpoints.queryFn declarations and building a middleware to catch queryFn's
meta
data.Inspire from #3432 (comment) , I achieve the following result:
This works, but the
action.meta?.baseQueryMeta
is not documented anywhere and is not type-safe.My question is: are there any other utilities that help extract the
meta : { message: 'Error' }
in a type-safe way?Beta Was this translation helpful? Give feedback.
All reactions