Open DominicGBauer opened 1 year ago
you have to create a new file and use enhanceEndpoints! to this you add transformResponse
import { api as generatedApi } from '../Feed.generated'
export const feedApi = generatedApi.enhanceEndpoints({
endpoints: {
FeedDocument: {
transformResponse: (response: FeedQuery) => response
}
}
})
export const { useFeedDocument } = feedApi
Describe the solution you'd like
I would like the codegen to automatically generate transformResponse function when api endpoint is generated e.g.
The reason is that I end up manually adding this every time because the api will send something like
data.applications
instead ofapplications