releases.shpreview
Apollo GraphQL/Apollo Client/@apollo/client@4.0.4

@apollo/client@4.0.4

$npx -y @buildinternet/releases show rel_Y-srIQr9s9M6-1T0aZP1z

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"

Fetched April 11, 2026