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
I've just had a go at chucking this into a mature app, with an existing API.
I only need to make a small change; eg. add a couple of properties, to an existing call.
But I want the rest of the api response to remain the same.
It would be great if you could trap a response from the server & manipulate it before handing back to the calling code.
The text was updated successfully, but these errors were encountered:
Mirage route handlers are promise-aware so you could try fetching from your Mirage code, massaging and the responding. (Then it wouldn't work offline/locally.)
I've also seen folks copy+paste an existing response into their repo and using the passthrough api to let all other responses hit the existing API.
Yes, but re-calling the api might involve a bit of boilerplate. Basically there’s nothing first class in Mirage to support this but because route handlers wait on promises you might be able to do it today!
I've just had a go at chucking this into a mature app, with an existing API.
I only need to make a small change; eg. add a couple of properties, to an existing call.
But I want the rest of the api response to remain the same.
It would be great if you could trap a response from the server & manipulate it before handing back to the calling code.
The text was updated successfully, but these errors were encountered: