vulcan-next icon indicating copy to clipboard operation
vulcan-next copied to clipboard

Setup node-fetch-har or next-fetch-har

Open eric-burel opened this issue 5 years ago • 0 comments

This allows to dump requests emitted during server-side rendering (or any other kind of request emitted by the server) as JSON readable by DevTools network tabs.

This means we can debug network request of the server the same way we do with the client. Especially useful to catch bugs such as wrong headers in Apollo queries emitted during SSR etc.

Node version is a raw implementation, Next version is more opinionated but it helps creating an UI to easily get the JSON dump.

https://github.com/exogen/node-fetch-har https://github.com/exogen/next-fetch-har

Steps

  • [ ] Explore node-fetch-har/next-fetch-har
  • [ ] Use Next new fetch function, see #70
  • [ ] Install next-fetch-har. When done, it should be easy to grab the HAR file and put it in chrome to analyze requests.
  • [ ] Find a way to test it, eg by creating a dummy page with SSR
  • [ ] Check that it is not deployed in production

eric-burel avatar Sep 25 '20 07:09 eric-burel