graphql-request icon indicating copy to clipboard operation
graphql-request copied to clipboard

feat: Provide request headers in ClientError.request

Open thibmaek opened this issue 2 years ago • 1 comments

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.

thibmaek avatar Feb 22 '22 14:02 thibmaek

@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.

thibmaek avatar May 24 '22 14:05 thibmaek