github graffle-js/graffle graphql-request@7.3.4

17 hours ago

Bug Fixes

  • Fixed #1281: GraphQL errors and data are now accessible from 4xx/5xx HTTP responses
  • Fixed #1461: ClientError is properly returned for non-2xx responses with malformed bodies
  • Fixed #1462: ClientError is properly returned for non-2xx responses with unsupported content types

Changes

  • Non-2xx HTTP responses now parse the response body first to extract GraphQL errors/data when available
  • Non-2xx responses with valid GraphQL bodies return ClientError with errors and data accessible
  • Non-2xx responses with invalid bodies still return ClientError (not generic Error) for backwards compatibility
  • This release reverts PRs #1457 and #1459 which introduced regressions, then reapplies a minimal fix for #1281

Breaking Changes

None - this release maintains backwards compatibility while adding support for accessing GraphQL errors from 4xx/5xx responses.

Don't miss a new graffle release

NewReleases is sending notifications on new releases.