# apollo-client/release
Apollo Client @apollo/client@4.3.0-alpha.10
importance: mediumbreakingfeatureprerelease
This release raises the minimum supported TypeScript version to 5.9.x and introduces the ability to enforce stricter type policies for fragment APIs through the new `FromOptionValue` key on the `TypeOverrides` interface.
affected
Users on TypeScript versions below 5.9.x will need to upgrade, and developers can now enforce stricter type policies for fragment APIs.
action
Upgrade TypeScript to version 5.9.x if using an older version.
release_signals
-The minimum supported TypeScript version is now 5.9.x, which may require users to upgrade their TypeScript version.
+Added support for overriding the `from` input of fragment APIs via a new `FromOptionValue` key on the `TypeOverrides` interface, allowing stricter type policies.
code_snippet
// apollo.d.ts
import "@apollo/client";
import type { HKT, StoreValue } from "@apollo/client/utilities";
type StrictFrom<TData extends { __typename: string }> =
| {
// the `__typename` has to match the one of the fragment type
__typename: TData["__typename"];
// `& {}` forces values to be "defined" so an explicit `undefined`
// (as well as `null`) is rejected.
[key: string]: Exclude<StoreValue, null | undefined> & {};
}
| { __ref: string }
| string
| null;
interface StrictFromHKT extends HKT {
arg1: { __typename: string }; // TData
return: StrictFrom<this["arg1"]>;
}
declare module "@apollo/client" {
export interface TypeOverrides {
FromOptionValue: StrictFromHKT;
}
}# community_signal
How useful is this release to your stack?
—
net score
Sign in with GitHub to cast your vote.
Sign in with GitHub to vote
You’ll return to this release, then choose your vote.