You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update Apollo GraphQL packages to v4
* Migrate app code to Apollo Client v4 APIs
Apollo Client v4 moved the React hooks/types out of the package root into
@apollo/client/react and reworked error handling. Update imports and the
generated types so the app type-checks against v4:
- ApolloProvider, useReactiveVar, useApolloClient, and the generated query/
mutation hooks now import from @apollo/client/react.
- errorLink/extractAuthErrorCode use CombinedGraphQLErrors (the v4 wrapper for
GraphQL errors) instead of the removed graphQLErrors field.
- client.query() data is now T | undefined in v4 — guard the upload-URL read.
- Remap the generated MutationFunction/BaseMutationOptions references and
@ts-ignore the unused, v4-incompatible generated *SuspenseQuery hooks, since
typescript-react-apollo has no v4 support yet (documented in codegen.ts).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments