Skip to content

v3.7.6

Compare
Choose a tag to compare
@github-actions github-actions released this 31 Jan 20:27
· 1322 commits to main since this release
9f0e298

Patch Changes

  • #10470 47435e879 Thanks @alessbell! - Bumps TypeScript to 4.9.4 (previously 4.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 pass null|undefined into 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 like error TS2344: Type 'YourGenericType' does not satisfy the constraint 'OperationVariables'. In that case, make sure that YourGenericType is restricted to a type that only accepts objects via extends, like Record<string, any> or @apollo/client's OperationVariables:
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);
  }
  • #10408 55ffafc58 Thanks @zlrlo! - fix: modify BatchHttpLink to have a separate timer for each different batch key

  • #9573 4a4f48dda Thanks @vladar! - Improve performance of local resolvers by only executing selection sets that contain an @client directive. 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.