-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTKQ feature proposal: Add transformError property to the endpoints #1139
Comments
I'd love to have this feature! any opinions on this from the team? I can try to come up with a PR if this is something we want to have |
Yeah, if someone would like to take a stab at this and file a PR, we can look at it. |
But note that this will probably be touching a lot of types, so it might get very complicated. |
created #1841 as a first pass. let me know if I'm going the correct direction |
Merged this - it'll be in the #2401 PR preview builds momentarily, and I'm hoping to put out |
It would be great to have a
transformResponse
equivalent for errors. ThetransformError
property would allow manipulation of the error returned by a query or mutation before it hits the cache.This new property would help to decouple error parsing logic from the view. The service will encapsulate the logic, and the views will act just as a presenter of the data/error the query or mutation returns.
The text was updated successfully, but these errors were encountered: