You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the return type of transformResponse on enhanceEndpoints has to match the original return type from createApi.
This diminishes the value and ability of enhanceEndpoints:
Often, it is preferred to have client code use different shapes than the ones exposed by an API and transformResponse is the mechanism to do so.
However, once RTK codegen is used, transformResponse should be defined on enhanceEndpoints and not on the (generated) createApi.
Example
Using the enhancedEndpoints example from the docs, this usage of transformResponse currently fails to compile: