Change8

v4.0.0-alpha.3

Breaking Changes
📦 apollo-client
2 breaking1 features🔧 2 symbols

Summary

Network errors now respect `errorPolicy` and the `called` property was removed from `useQuery`, requiring updates to error handling and query state checks.

⚠️ Breaking Changes

  • Promise-based APIs such as `client.query` no longer reject on network errors; they now resolve with an `error` property containing the network error. Update error handling to check the `error` field instead of catching a rejected promise.
  • The `called` property has been removed from the object returned by `useQuery`. Remove any references to `called` in your code.

Migration Steps

  1. Modify code that relied on promise rejection for network errors to handle the resolved result's `error` property.
  2. Delete any usage of the `called` property from `useQuery` return values.

✨ New Features

  • Network errors now adhere to the `errorPolicy`, making GraphQL errors and network errors behave the same way.

🔧 Affected Symbols

client.queryuseQuery