Skip to content

Commit 562ee41

Browse files
apollo-bot2gh-action-runner
authored andcommitted
1 parent 06e90e1 commit 562ee41

File tree

5 files changed

+78
-11
lines changed

5 files changed

+78
-11
lines changed

.gitleaks.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,23 @@
1919
[ rules.allowlist ]
2020
commits = [
2121
"2568a4c9921ccb04e8391200554bdd8897000fa6",
22-
22+
2323
]
2424

2525
[[ rules ]]
2626
id = "generic-api-key"
2727
[ rules.allowlist ]
2828

2929
paths = [
30-
# Allowlists a false positive detection at
30+
# Allowlists a false positive detection at
3131
# https://github.com/apollographql/apollo-ios/blob/474554504e7e33cef2a71774f825d5b3947ff797/Tests/ApolloCodegenTests/TestHelpers/ASTMatchers.swift#L72
3232
# This was previously allowlisted via commit hash, but updating that rule
3333
# To support allowlisting false positive detections in the files below as well.
3434
'''Tests/ApolloCodegenTests/TestHelpers/ASTMatchers.swift''',
3535

36+
# Allowlists a false positive detection at line 156
37+
'''apollo-ios/Sources/Apollo/Execution/GraphQLResultAccumulator.swift$'''
38+
3639
# Allowlist the various high-entropy strings in xcscmblueprint files
3740
'''Apollo.xcodeproj/project.xcworkspace/xcshareddata/Apollo.xcscmblueprint$''',
3841
'''ApolloSQLite.xcodeproj/project.xcworkspace/xcshareddata/ApolloSQLite.xcscmblueprint$''',

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,69 @@
11
# Change Log
22

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+
367
## v2.0.0-beta-3
468

569
### New

CLI/apollo-ios-cli.tar.gz

-18 Bytes
Binary file not shown.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</div>
55
<h1 align="center">Apollo iOS</h1>
66

7-
**The industry-leading GraphQL client in Swift for iOS, macOS, watchOS, tvOS, and more.** Apollo iOS delivers powerful caching, robust code generation, and intuitive APIs to accelerate your app development.
7+
**The industry-leading GraphQL client in Swift for iOS, macOS, watchOS, tvOS, and visionOS.** Apollo iOS delivers powerful caching, robust code generation, and intuitive APIs to accelerate your app development.
88

99
➡️ [**Get Started with Apollo iOS →**](https://www.apollographql.com/docs/ios/get-started?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme)
1010

@@ -18,11 +18,11 @@
1818
<img src="https://img.shields.io/badge/license-MIT-lightgrey.svg?maxAge=2592000" alt="MIT license">
1919
</a>
2020
<a href="Platforms">
21-
<img src="https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS-333333.svg" alt="Supported Platforms: iOS, macOS, tvOS, watchOS" />
21+
<img src="https://img.shields.io/badge/platforms-iOS%2015%2B%20%7C%20macOS%2012%2B%20%7C%20tvOS%2015%2B%20%7C%20watchOS%208%2B%20%7C%20visionOS%201%2B-333333.svg" alt="Supported Platforms: iOS 15+, macOS 12+, tvOS 15+, watchOS 8+, visionOS 1+" />
2222
</a><br><br>
2323

2424
<a href="https://github.com/apple/swift">
25-
<img src="https://img.shields.io/badge/Swift-5.7-orange.svg" alt="Swift 5.7 supported">
25+
<img src="https://img.shields.io/badge/Swift-6.1-orange.svg" alt="Swift 6.1 supported">
2626
</a>
2727
<a href="https://swift.org/package-manager/">
2828
<img src="https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square" alt="Swift Package Manager compatible">
@@ -34,10 +34,10 @@
3434

3535
## ❓ Why Choose Apollo iOS?
3636

37-
✅ Intuitive caching - Intelligent in-memory or SQLite out of the box<br>
38-
✅ Highly configurable code generation - The days of hand-writing models for network responses are over!<br>
39-
✅ Opinionated - Leads users down the "pit of success" and encourages good practices by default<br>
40-
✅ Production-tested - Powers countless apps worldwide that serve millions of end users<br>
37+
**Intuitive caching** - Intelligent in-memory or SQLite out of the box<br>
38+
**Highly configurable code generation** - The days of hand-writing models for network responses are over!<br>
39+
**Opinionated** - Leads users down the "pit of success" and encourages good practices by default<br>
40+
**Production-tested** - Powers countless apps worldwide that serve millions of end users<br>
4141

4242
## 🚀 Quick Start
4343

@@ -47,7 +47,7 @@
4747
dependencies: [
4848
.package(
4949
url: "https://github.com/apollographql/apollo-ios.git",
50-
.upToNextMajor(from: "1.0.0")
50+
.upToNextMajor(from: "2.0.0")
5151
),
5252
],
5353
```

Sources/Apollo/Constants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import Foundation
22

33
public enum Constants {
44
public static let ApolloClientName = "apollo-ios"
5-
public static let ApolloClientVersion: String = "2.0.0-beta-3"
5+
public static let ApolloClientVersion: String = "2.0.0"
66
}

0 commit comments

Comments
 (0)