@apollo/client@4.2.0-alpha.0
📦 apollo-clientView on GitHub →
✨ 1 features🐛 1 fixes🔧 1 symbols
Summary
This minor release improves the TypeScript return type accuracy for `client.query` based on the configured `errorPolicy`, specifically making the `data` property non-nullable when `errorPolicy` is set to 'none'.
Migration Steps
- If you were previously checking for `undefined` on the `data` property returned from `client.query` when using `errorPolicy: 'none'`, you can now safely remove those checks.
✨ New Features
- Improved the accuracy of the return type for `client.query` to better reflect the current `errorPolicy`.
🐛 Bug Fixes
- The `data` property returned by `client.query` is no longer nullable when the `errorPolicy` is set to `none`, reducing the need for explicit `undefined` checks or optional chaining.