Change8

@apollo/client@4.2.0-alpha.7

📦 apollo-clientView on GitHub →
1 features🔧 4 symbols

Summary

This release enhances type safety for default options when using `preloadQuery` by extending the existing work from `defaultOptions` to the preloading mechanism.

Migration Steps

  1. If using `preloadQuery` and relying on default options for WatchQuery settings (like `errorPolicy`), ensure your type declarations in `apollo.d.ts` are correctly structured as shown in the notes to leverage the new type safety.

✨ New Features

  • Extended `defaultOptions` type-safety to `preloadQuery` returned from `createQueryPreloader`. Defaults declared in `DeclareDefaultOptions.WatchQuery` now correctly set data states for the `PreloadedQueryRef`.

Affected Symbols