graphql-request
graphql-request copied to clipboard
feat: Provide request headers in ClientError.request
For more context see: https://github.com/tannerlinsley/react-query/discussions/3324
It seems logical to me that you would also be able to see your request headers in the error response aside from just the GQL body that's being sent. This is how the browser, fastify, express etc all tackle it.
Does this sound like an idea? Let me know of there is something else I can do here.
@jasonkuhrt I updated the inline snapshots for errors and added a simple assertion to check if a header property is present in the error response when passed.