Skip to content

Commit 0afad0e

Browse files
committed
Small improvements for clarity and readability
Removes puffery and adds some context for readers
1 parent a79d3f2 commit 0afad0e

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

release-notes.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Apollo Client v4.0 Release Notes
22

3-
Apollo Client v4 represents our most significant release yet, featuring comprehensive improvements to error handling, TypeScript support, and developer experience. This release modernizes the codebase while maintaining the powerful GraphQL client capabilities you rely on.
3+
Apollo Client v4 contains comprehensive improvements to error handling, TypeScript support, and developer experience. This release modernizes the codebase and reduces bundle size while maintaining the powerful GraphQL client capabilities you rely on.
44

55
## Major Themes
66

77
### Enhanced Error Handling
88

9-
Apollo Client v4 completely reimagines error handling with a new, more granular error system that replaces the monolithic `ApolloError` class.
9+
Apollo Client v4 introduces more precise error abstractions that replace the monolithic `ApolloError` class.
1010

1111
**Key Changes:**
1212
- **Specialized Error Classes**: Errors are now categorized into distinct types:
@@ -15,7 +15,6 @@ Apollo Client v4 completely reimagines error handling with a new, more granular
1515
- `CombinedProtocolErrors` for transport-level errors
1616
- **Type-Safe Error Handling**: Use `instanceof` checks to handle specific error types
1717
- **Improved Error Wrapping**: String errors are automatically wrapped in `Error` instances, and non-error objects are wrapped in `UnconventionalError` with a `cause` property
18-
- **GraphQL over HTTP Spec Compliance**: Full support for `application/graphql-response+json` media type with stricter adherence to the GraphQL over HTTP specification
1918

2019
**Migration Example:**
2120
```typescript
@@ -38,7 +37,7 @@ if (error instanceof CombinedGraphQLErrors) {
3837

3938
### TypeScript Improvements
4039

41-
Apollo Client v4 delivers substantial TypeScript enhancements that improve type safety and developer experience.
40+
Apollo Client v4 improves type safety and developer experience through its type definitions.
4241

4342
**dataState Type System Overhaul:**
4443
- The `TData` generic is no longer modified by the `DataState` generic
@@ -61,7 +60,7 @@ Apollo Client v4 delivers substantial TypeScript enhancements that improve type
6160

6261
### The New `dataState` Property
6362

64-
The `dataState` property is a powerful new addition that provides clear visibility into the completeness of your query results.
63+
The `dataState` property provides clear visibility into the completeness of your query results.
6564

6665
**Values:**
6766
- `empty`: No data available (`data` is `undefined`)
@@ -89,7 +88,7 @@ if (dataState === 'complete') {
8988

9089
### `@defer` Support Evolution
9190

92-
Apollo Client v4 introduces a pluggable incremental delivery system for the `@defer` directive.
91+
Apollo Client v4 introduces a pluggable incremental delivery system for the `@defer` directive. This gives developers the flexibility to define which incremental delivery protocol to use, with the flexibility needed to adapt to any further specification changes.
9392

9493
**Pluggable Implementation:**
9594
- Configure incremental delivery through the `incrementalHandler` option
@@ -106,7 +105,7 @@ Apollo Client v4 introduces a pluggable incremental delivery system for the `@de
106105

107106
### Local State Management Enhancements
108107

109-
Local state management in Apollo Client v4 has been completely revamped for better reliability and type safety.
108+
Local state management in Apollo Client v4 has been revamped for modularity, reliability and type safety.
110109

111110
**Resolver System Overhaul:**
112111
- Resolvers have been moved from `ApolloClient` to a new `LocalState` class
@@ -152,9 +151,8 @@ const resolver = (parent, args, context, info) => {
152151
```
153152

154153
**New Codegen Plugin:**
155-
- `@apollo/client-graphql-codegen` package for creating resolver types
156-
- Type-safe resolver development
157-
- Tailored specifically for `LocalState` usage
154+
155+
This release introduces the `@apollo/client-graphql-codegen` package for creating resolver types for GraphQL Code Generator. It is tailored specifically for `LocalState` usage and allows for type-safe resolver development.
158156

159157
## Additional Improvements
160158

@@ -166,7 +164,7 @@ All React-related exports have moved to dedicated entrypoints:
166164
- Testing utilities: `@apollo/client/testing/react`
167165
- Note: `gql` should be imported from `@apollo/client`, not from `@apollo/client/react`
168166

169-
This change allows core client usage without requiring React as a dependency.
167+
In previous versions, users sometimes inadvertently imported React modules through seemingly unrelated paths. In v4 we resolve these footguns to make it more transparent when React-only modules are being imported.
170168

171169
### Modern Package Format
172170

@@ -224,6 +222,7 @@ const link = new HttpLink({ uri: '/graphql' });
224222
- No longer supports Node Streams or Async Iterators as `Response.body`
225223
- Better abort signal handling
226224
- WebSocketLink deprecation warning added
225+
- Full support for `application/graphql-response+json` media type with stricter adherence to the GraphQL over HTTP specification
227226

228227
### SSR Improvements
229228

@@ -250,4 +249,4 @@ For detailed migration guides and examples, visit our documentation at [apollogr
250249

251250
## Acknowledgments
252251

253-
This release represents months of work from the Apollo Client team and our amazing community. Thank you to all our contributors who helped make Apollo Client v4 the best version yet!
252+
This release represents years of work from the Apollo Client team and our amazing community. Thank you to all our contributors who helped make v4 possible!

0 commit comments

Comments
 (0)