github apollographql/apollo-client @apollo/client@4.0.4

2 days ago

Patch Changes

  • #12892 db8a04b Thanks @jerelmiller! - Prevent unhandled rejections from the promise returned by calling the mutate function from the useMutation hook.

  • #12899 5352c12 Thanks @phryneas! - Fix an issue when invariant is called by external libraries when no dev error message handler is loaded.

  • #12895 71f2517 Thanks @jerelmiller! - Support skipToken with useQuery to provide a more type-safe way to skip query execution.

    import { skipToken, useQuery } from "@apollo/client/react";
    
    // Use `skipToken` in place of `skip: true` for better type safety
    // for required variables
    const { data } = useQuery(QUERY, id ? { variables: { id } } : skipToken);

    Note: this change is provided as a patch within the 4.0 minor version because the changes to TypeScript validation with required variables in version 4.0 made using the skip option more difficult.

  • #12900 c0d5be7 Thanks @phryneas! - Use named export equal instead of default from "@wry/equality"

Don't miss a new apollo-client release

NewReleases is sending notifications on new releases.