@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
4.3.5 is the newest release of 4.x.
In short
4 fixed
Release note
Patch Changes
Fix accidental widening of the
client.mutatereturn type whenoptimisticResponsewas present.Fix result types widened when a query's variables had constant types (e.g.
TypedDocumentNode<Data, { type: "main" }>). This caused options such asreturnPartialDataorerrorPolicyto be reported as their widened types (e.g.boolean,ErrorPolicy) instead of the value that was passed which returned the wrongdataanddataStatetypes.Fix issue where unknown options were permitted by TypeScript when passed alongside a valid option to APIs with modern signatures.
Update the return type of
refetch,fetchMoreanduseLazyQuery'sexecutefunction on the providederrorPolicy. Previously these APIs all used the default type which typeddataasTData | undefinedanderrorasErrorLike | undefined.