3 ms·
Tacking a custom header to the response is a nice trick! Could be particularly useful for GraphQL apps where every response is a big opaque answer from `/api/g
by ludwigvan 7y ago
Tacking a custom header to the response is a nice trick!
Could be particularly useful for GraphQL apps where every response is a big opaque answer from `/api/graphql`: Add the GraphQL operation name to the response header.
This will also help with Chrome Devtools where you can add custom headers to the Network tab, otherwise you just see tons of POST reqs to `/api/graphql`: https://umaar.com/dev-tips/115-manage-network-response-headers/ https://umaar.com/dev-tips/115-manage-network-response-heade...