Features
- GraphQL requests are now being printed into browser’s console using a proper format (operation name / response status) (#161, #174)
- Each custom request handler can have its own
log
function that controls what and how gets printed into browser’s console for introspection:
// my-handler.js
export const myHandler = () => {
return {
log(req, res, handler) {
console.log('%s %s', req.method, req.url.href)
}
}
}
The information available in the log
function:
req
, intercepted request instance;res
, resolved mocked response object;handler
, exact request handler that captured this request.