apollographql / apollo-client

:rocket:  A fully-featured, production ready caching GraphQL client for every UI framework and GraphQL server.
https://apollographql.com/client
MIT License
19.38k stars 2.66k forks source link

Change usages of the `GraphQLError` type to `GraphQLFormattedError`. #11789

Closed phryneas closed 4 months ago

phryneas commented 7 months ago

Fixes #11787

This would be one direction of going at this.

The other way of going about it would be to change our usage of the GraphQLError type to the GraphQLErrorFromResponse type that I created here, with everything except message being optional.

We'll have to discuss that internally - putting it on the agenda for next meeting.

changeset-bot[bot] commented 7 months ago

🦋 Changeset detected

Latest commit: d7fa5fed16f9674334d46b3d7364a08a4ca65f1b

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

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | @apollo/client | Minor |

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

phryneas commented 7 months ago

Funny enough, nothing here fails for me locally. I'll have to take a closer look.

jerelmiller commented 4 months ago

@phryneas is this something we want to move forward with? If so, what is left to be done?

phryneas commented 4 months ago

Thanks for bringing this up! I did some digging and we decided "🚀 🌔" on this back on April 22. I'll get it ready for review.

github-actions[bot] commented 4 months ago

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 39.17 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 47.9 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 45.44 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 34.31 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 32.17 KB (0%)
import { ApolloProvider } from "dist/react/index.js" 1.26 KB (0%)
import { ApolloProvider } from "dist/react/index.js" (production) 1.24 KB (0%)
import { useQuery } from "dist/react/index.js" 5.23 KB (0%)
import { useQuery } from "dist/react/index.js" (production) 4.31 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 5.71 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production) 4.79 KB (0%)
import { useMutation } from "dist/react/index.js" 3.62 KB (0%)
import { useMutation } from "dist/react/index.js" (production) 2.84 KB (0%)
import { useSubscription } from "dist/react/index.js" 4.4 KB (0%)
import { useSubscription } from "dist/react/index.js" (production) 3.45 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" 5.49 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.15 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" 4.99 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.64 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" 5.07 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.72 KB (0%)
import { useReadQuery } from "dist/react/index.js" 3.39 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 3.33 KB (0%)
import { useFragment } from "dist/react/index.js" 2.32 KB (0%)
import { useFragment } from "dist/react/index.js" (production) 2.27 KB (0%)
netlify[bot] commented 4 months ago

Deploy Preview for apollo-client-docs ready!

Name Link
Latest commit 6f005ebb380f45dbf4b3cd94645d987ef777b72d
Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/668bd62a8cf40d00083ff890
Deploy Preview https://deploy-preview-11789--apollo-client-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 4 months ago

Deploy Preview for apollo-client-docs ready!

Name Link
Latest commit d4abb0258116837fee1c4d703b4e73ace99ff271
Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/668d4f8267d1690008c1af19
Deploy Preview https://deploy-preview-11789--apollo-client-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.