Open Jayadev6191 opened 3 years ago
You can use passthrough:
export function makeServer({ environment = 'test' }) {
return createServer({
environment,
routes() {
this.get('/getFavFruit', () => 'apple');
// passthrough
this.passthrough('/getFavDrink');
},
});
}
Example:
If my app requires two API calls
If the implementation of
getFavDrink
is ready is it possible to only mockgetFavFruit
API usingmiragejs
and continue to make real network calls togetFavDrink
endpoint ?When I have the above code in my server.js file I'm not able to make real network calls to
/getFavDrink
endpoint.Does this mean, miragejs intercepts all the network calls even if they are not mocked in the routes?