Skip to content

Commit 2e32b3a

Browse files
calvincestarijamesonwilliams
authored andcommitted
Release 0.51.0 (apollographql#2086)
* Update version number * Update changelog * Update SourceDocsLib dependecy * Update generated documentation * Update changelog with cache key caveat * Update changelog for merging of apollographql#2147 * Update changelog for apollographql#2177 and apollographql#2168 * Update documentation
1 parent da5727b commit 2e32b3a

24 files changed

Lines changed: 270 additions & 36 deletions

File tree

CHANGELOG.md

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

3+
## v0.51.0
4+
- **Allow periods in arguments to be ignored when parsing cacheKeys**: If your query arguments include periods they will no longer cause broken cache keys. This means the cached data for those queries can be correctly found and returned. The caveat with this change though is that if you use a persisted cache, after the upgrade you could see cache misses and the data would be refetched. [#2057](https://github.com/apollographql/apollo-ios/pull/2057) - _Thanks to [Hesham Salman](https://github.com/Iron-Ham) for the contribution._
5+
- **Fixed - [`Sendable` class `JavaScriptError` cannot inherit from another class other than `NSObject`](https://github.com/apollographql/apollo-ios/issues/2146):** Xcode 13.3 introduced some additional requirements for `Error` types and `JavaScriptError` did not conform causing compile errors in `ApolloCodegenLib`. This change disables `Sendable` type checking for `JavaScriptError` while maintaining type-safety across concurrency boundaries. [#2147](https://github.com/apollographql/apollo-ios/pull/2147) - _Thank you to [Tiziano Coroneo](https://github.com/TizianoCoroneo) for the contribution._
6+
- **Fixed - [Watcher using a policy that shouldn't hit the network, can still hit the network](https://github.com/apollographql/apollo-ios/issues/2170):** If the cache policy given to the `watch(query:cachePolicy:)` method of `ApolloClient` was `.returnCacheDataDontFetch` it could still trigger a remote fetch of the query. - _Thank you to [Peter Potrebic](https://github.com/potrebic) for raising the issue._
7+
- **BREAKING CHANGE - [`graphql-ws` Protocol Support](https://github.com/apollographql/apollo-ios/issues/1622):** We've added official support for the [graphql-ws](https://github.com/enisdenjo/graphql-ws) library and its [`graphql-transport-ws`](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md) protocol. This is a breaking change because the `WebSocket` initializers now require you to specify which protocol to use.
8+
39
## v0.50.0
410
- **Dropped SPM support for Swift 5.2**: The minimum version of the Swift tools and language compatibilty required to process the SPM manifest is Swift 5.3. This means a minimum of Xcode version 12 is required for Swift Package Manager support. [#1992](https://github.com/apollographql/apollo-ios/pull/1992)
511
- **Removed unnecessary assertion failure**: The completion handler on `returnResultAsyncIfNeeded` is defined as optional but if not included would cause debug builds to crash with an `assertionFailure` in the case of a `failure` of the `Result`. [#2005](https://github.com/apollographql/apollo-ios/pull/2005) - _Thank you to [Richard Topchii](https://github.com/richardtop) for raising this issue!_
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CURRENT_PROJECT_VERSION = 0.50.0
1+
CURRENT_PROJECT_VERSION = 0.51.0

SwiftScripts/Package.resolved

Lines changed: 4 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SwiftScripts/Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import PackageDescription
66
let package = Package(
77
name: "Codegen",
88
platforms: [
9-
.macOS(.v10_14)
9+
.macOS(.v10_15)
1010
],
1111
dependencies: [
1212
.package(name: "Apollo", path: ".."),
13-
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "0.3.0"),
14-
.package(url: "https://github.com/eneko/SourceDocs.git", .upToNextMinor(from: "1.2.0"))
13+
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.0.2")),
14+
.package(url: "https://github.com/eneko/SourceDocs.git", .upToNextMinor(from: "2.0.0"))
1515
],
1616
targets: [
1717
.target(name: "Codegen",

docs/source/api/Apollo/enums/CachePolicy.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,12 @@ case returnCacheDataAndFetch
4848
```
4949

5050
Return data from the cache if available, and always fetch results from the server.
51+
52+
## Properties
53+
### `default`
54+
55+
```swift
56+
public static var `default`: CachePolicy = .returnCacheDataElseFetch
57+
```
58+
59+
The current default cache policy.

docs/source/api/Apollo/extensions/NetworkTransport.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,44 @@ public extension NetworkTransport
66
```
77

88
## Properties
9+
### `headerFieldNameApolloClientName`
10+
11+
```swift
12+
static var headerFieldNameApolloClientName: String
13+
```
14+
15+
The field name for the Apollo Client Name header
16+
17+
### `headerFieldNameApolloClientVersion`
18+
19+
```swift
20+
static var headerFieldNameApolloClientVersion: String
21+
```
22+
23+
The field name for the Apollo Client Version header
24+
25+
### `defaultClientName`
26+
27+
```swift
28+
static var defaultClientName: String
29+
```
30+
31+
The default client name to use when setting up the `clientName` property
32+
933
### `clientName`
1034

1135
```swift
1236
var clientName: String
1337
```
1438

39+
### `defaultClientVersion`
40+
41+
```swift
42+
static var defaultClientVersion: String
43+
```
44+
45+
The default client version to use when setting up the `clientVersion` property.
46+
1547
### `clientVersion`
1648

1749
```swift

docs/source/api/Apollo/protocols/GraphQLFragment.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,16 @@
55
```swift
66
public protocol GraphQLFragment: GraphQLSelectionSet
77
```
8+
9+
## Properties
10+
### `fragmentDefinition`
11+
12+
```swift
13+
static var fragmentDefinition: String
14+
```
15+
16+
### `possibleTypes`
17+
18+
```swift
19+
static var possibleTypes: [String]
20+
```

docs/source/api/Apollo/protocols/GraphQLSelectionSet.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ public protocol GraphQLSelectionSet
77
```
88

99
## Properties
10+
### `selections`
11+
12+
```swift
13+
static var selections: [GraphQLSelection]
14+
```
15+
1016
### `resultMap`
1117

1218
```swift

docs/source/api/Apollo/structs/GraphQLFile.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ public let fileURL: URL?
4545
public let contentLength: UInt64
4646
```
4747

48+
### `octetStreamMimeType`
49+
50+
```swift
51+
public static let octetStreamMimeType = "application/octet-stream"
52+
```
53+
54+
A convenience constant for declaring your mimetype is octet-stream.
55+
4856
## Methods
4957
### `init(fieldName:originalName:mimeType:data:)`
5058

docs/source/api/ApolloAPI/enums/GraphQLEnum.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ The underlying enum case. If the value is `__unknown`, this will be `nil`.
4646
public var rawValue: String
4747
```
4848

49+
### `allCases`
50+
51+
```swift
52+
public static var allCases: [GraphQLEnum<T>]
53+
```
54+
55+
A collection of all known values of the wrapped enum.
56+
This collection does not include the `__unknown` case.
57+
4958
## Methods
5059
### `init(_:)`
5160

0 commit comments

Comments
 (0)