github apollographql/apollo-client @apollo/client@4.2.10

6 hours ago

Patch Changes

  • #13385 bfb674e Thanks @jerelmiller! - Fix accidental widening of the client.mutate return type when optimisticResponse was present.

  • #13382 365373e Thanks @jerelmiller! - Fix result types widened when a query's variables had constant types (e.g. TypedDocumentNode<Data, { type: "main" }>). This caused options such as returnPartialData or errorPolicy to be reported as their widened types (e.g. boolean, ErrorPolicy) instead of the value that was passed which returned the wrong data and dataState types.

  • #13382 365373e Thanks @jerelmiller! - Fix issue where unknown options were permitted by TypeScript when passed alongside a valid option to APIs with modern signatures.

  • #13383 5840f50 Thanks @jerelmiller! - Update the return type of refetch, fetchMore and useLazyQuery's execute function on the provided errorPolicy. Previously these APIs all used the default type which typed data as TData | undefined and error as ErrorLike | undefined.

Don't miss a new apollo-client release

NewReleases is sending notifications on new releases.