@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
3.14.1 is the newest release of 3.x.
In short
3 fixed
Release note
Patch Changes
Bumps TypeScript to
4.9.4(previously4.7.4) and updates types to account for changes in TypeScript 4.8 by propagating contstraints on generic types. Technically this makes some types stricter as attempting to passnull|undefinedinto certain functions is now disallowed by TypeScript, but these were never expected runtime values in the first place.
This should only affect you if you are wrapping functions provided by Apollo Client with your own abstractions that pass in their generics as type arguments, in which case you might get an error likeerror TS2344: Type 'YourGenericType' does not satisfy the constraint 'OperationVariables'. In that case, make sure thatYourGenericTypeis restricted to a type that only accepts objects viaextends, likeRecord<string, any>or@apollo/client'sOperationVariables:import { QueryHookOptions, QueryResult, useQuery, + OperationVariables, } from '@apollo/client'; - export function useWrappedQuery<T, TVariables>( + export function useWrappedQuery<T, TVariables extends OperationVariables>( query: DocumentNode, queryOptions: QueryHookOptions<T, TVariables> ): QueryResult<T, TVariables> { const [execute, result] = useQuery<T, TVariables>(query); }Modify BatchHttpLink to have a separate timer for each different batch key
Improve performance of local resolvers by only executing selection sets that contain an
@clientdirective. Previously, local resolvers were executed even when the field did not contain@client. While the result was properly discarded, the unncessary work could negatively affect query performance, sometimes signficantly.