urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.57k stars 444 forks source link

fix(core): support non-spec errors #3395

Closed JoviDeCroock closed 10 months ago

JoviDeCroock commented 10 months ago

Fixes #3394

Summary

When an API returns errors as a non-array we have to still return the error, however we try to cast this to a GraphQLError which does not work out. We add an additional check whether we are actually dealing with an array of errors so we can support this case.

changeset-bot[bot] commented 10 months ago

🦋 Changeset detected

Latest commit: 838cfa96abedf21ee3f9cc0789a626822b0ce4f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------- | ----- | | @urql/core | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR