Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(core): Allow permissive passthrough for CombinedError.graphQLErrors (#3087)

authored by

Phil Pluckthun and committed by
GitHub
c417be20 e226c5b8

+10 -1
+5
.changeset/pink-penguins-grin.md
··· 1 + --- 2 + '@urql/core': patch 3 + --- 4 + 5 + Allow any object fitting the `GraphQLError` shape to rehydrate without passing through a `GraphQLError` constructor in `CombinedError`.
+5 -1
packages/core/src/utils/error.ts
··· 16 16 }; 17 17 18 18 const rehydrateGraphQlError = (error: any): GraphQLError => { 19 - if (error instanceof GraphQLError) { 19 + if ( 20 + error && 21 + error.message && 22 + (error.extensions || error.name === 'GraphQLError') 23 + ) { 20 24 return error; 21 25 } else if (typeof error === 'object' && error.message) { 22 26 return new GraphQLError(