|
1 | 1 | # Change Log
|
2 | 2 |
|
| 3 | +## v2.0.0 |
| 4 | + |
| 5 | +**Apollo iOS 2.0 is now available!** 🎉 |
| 6 | + |
| 7 | +Apollo iOS 2.0 represents a complete reimplementation of many components of the library, redesigned from the ground up to take full advantage of Swift's modern concurrency model. This major release introduces significant breaking changes but provides substantial improvements in type safety, performance, and developer experience. |
| 8 | + |
| 9 | +### 🚀 What's New |
| 10 | + |
| 11 | +- **Swift Concurrency First**: Complete reimplementation using `async/await` and structured concurrency |
| 12 | +- **Streamlined APIs**: Simplified client APIs with clearer separation of concerns and more precise type safety |
| 13 | +- **Modern Swift Features**: Full adoption of Swift 6 with strict concurrency enabled |
| 14 | +- **Enhanced Request Chain**: New interceptor framework with separate types for different request phases |
| 15 | +- **Sendable Types**: Most types now conform to `Sendable` for improved thread safety |
| 16 | + |
| 17 | +### 🔧 Major API Changes |
| 18 | + |
| 19 | +- **ApolloClient**: Complete redesign using `async/await` instead of callback-based APIs |
| 20 | +- **Cache Policies**: Split into discrete types (`cacheFirst`, `networkFirst`, `networkOnly`, `cacheOnly`, `cacheAndNetwork`) with specific return signatures |
| 21 | +- **Request Interceptors**: New framework with `GraphQLInterceptor`, `HTTPInterceptor`, `CacheInterceptor`, and `ResponseParsingInterceptor` types |
| 22 | +- **GraphQLResponse**: Renamed from `GraphQLResult` with improved generic typing over operations |
| 23 | + |
| 24 | +### ⚠️ Breaking Changes & Limitations |
| 25 | + |
| 26 | +**Minimum Deployment Targets** |
| 27 | +- iOS 15.0+ (was iOS 12.0+) |
| 28 | +- macOS 12.0+ (was macOS 10.14+) |
| 29 | +- tvOS 15.0+ (was tvOS 12.0+) |
| 30 | +- watchOS 8.0+ (was watchOS 5.0+) |
| 31 | +- visionOS 1.0+ (new) |
| 32 | + |
| 33 | +**Removed Features** |
| 34 | +- **CocoaPods Support**: No longer available. Use Swift Package Manager or XCFrameworks |
| 35 | +- **Legacy Network Session**: `URLSessionClient` replaced with `ApolloURLSession` protocol |
| 36 | +- **RequestContext**: Replaced with Swift 6 `@TaskLocal` values for dependency injection |
| 37 | + |
| 38 | +**Current Limitations** |
| 39 | +- **Web Socket Support**: Not available in initial 2.0 release. HTTP subscriptions are supported via `RequestChainNetworkTransport`. Web socket support will be added in a future 2.0.x release. |
| 40 | +- **Deprecated APIs**: 1.x callback-based APIs are deprecated but still available for incremental migration |
| 41 | + |
| 42 | +### 📖 Migration Guide |
| 43 | + |
| 44 | +Apollo iOS 2.0 migration follows a two-phase approach: |
| 45 | + |
| 46 | +**Phase 1: Breaking Changes** |
| 47 | +- Update request/response models with code-generation |
| 48 | +- Migrate custom `Interceptors` to new discrete types |
| 49 | +- Update custom `NetworkTransport` implementations |
| 50 | +- Update custom `NormalizedCache` implementations |
| 51 | + |
| 52 | +**Phase 2: Incremental Updates** |
| 53 | +- Migrate from deprecated callback APIs to new `async/await` APIs |
| 54 | +- Update cache policies to use new discrete types |
| 55 | +- Replace `RequestContext` with `@TaskLocal` values |
| 56 | + |
| 57 | +For detailed migration instructions, see the [Apollo iOS 2.0 Migration Guide](https://www.apollographql.com/docs/ios/migrations/2.0). |
| 58 | + |
| 59 | +### 🎯 Recommended Migration Path |
| 60 | + |
| 61 | +1. **Update dependency** to Apollo iOS 2.0 |
| 62 | +2. **Re-run code generation** with 2.0 engine |
| 63 | +3. **Fix breaking changes** (custom interceptors, network transports, etc.) |
| 64 | +4. **Incrementally migrate** `ApolloClient` usage from callbacks to `async/await` |
| 65 | +5. **Test thoroughly** at each step |
| 66 | + |
3 | 67 | ## v2.0.0-beta-3
|
4 | 68 |
|
5 | 69 | ### New
|
|
0 commit comments