graphcommerce-org / graphcommerce

GraphCommerce® is a headless storefront replacement for Magento 2 (PWA), that delivers a faster, better user experience. Fully customizable (React, Next.js) and open-source.
https://www.graphcommerce.org
Other
304 stars 67 forks source link

More elaborate error reporting for calls from graphql-mesh #1395

Open hnsr opened 2 years ago

hnsr commented 2 years ago

Describe the feature you'd like to request

We sometimes run into errors with calls made through graphql-mesh to external APIs. The current error reporting is not very verbose and I'd like more info on the exact call that errored

Describe the solution you'd like

An option to control verbosity of error logging for external API calls. It would be useful to see the API endpoint, HTTP error code, request body, request response and such

Describe alternatives you've considered

N/a

paales commented 2 years ago

We'll probably switch to https://github.com/dotansimha/graphql-yoga for the build in GraphQL server, which as support for envelop plugins like https://www.envelop.dev/docs/guides/monitoring-and-tracing which might help this usecase.

We might be able to write up an error handler that just outputs to stderr with the information.