Skip to content

Commit

Permalink
Release 0.51.0 (apollographql#2086)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
calvincestari authored and jamesonwilliams committed Nov 16, 2024
1 parent da5727b commit 2e32b3a
Show file tree
Hide file tree
Showing 24 changed files with 270 additions and 36 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

## v0.51.0
- **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._
- **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._
- **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._
- **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.

## v0.50.0
- **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)
- **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!_
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Shared/Project-Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 0.50.0
CURRENT_PROJECT_VERSION = 0.51.0
26 changes: 4 additions & 22 deletions SwiftScripts/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"repositoryURL": "https://github.com/eneko/SourceDocs.git",
"state": {
"branch": null,
"revision": "6c6443434ef04328dc18ac71c73e7a2ec0d531d1",
"version": "1.2.1"
"revision": "3a38adfe18ca73dfc2136b4b8c49407d1a812d50",
"version": "2.0.0"
}
},
{
Expand All @@ -87,26 +87,8 @@
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
"state": {
"branch": null,
"revision": "92646c0cdbaca076c8d3d0207891785b3379cbff",
"version": "0.3.1"
}
},
{
"package": "llbuild",
"repositoryURL": "https://github.com/apple/swift-llbuild.git",
"state": {
"branch": null,
"revision": "f1c9ad9a253cdf1aa89a7f5c99c30b4513b06ddb",
"version": "0.1.1"
}
},
{
"package": "SwiftPM",
"repositoryURL": "https://github.com/apple/swift-package-manager",
"state": {
"branch": null,
"revision": "8656a25cb906c1896339f950ac960ee1b4fe8034",
"version": "0.4.0"
"revision": "e1465042f195f374b94f915ba8ca49de24300a0d",
"version": "1.0.2"
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions SwiftScripts/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import PackageDescription
let package = Package(
name: "Codegen",
platforms: [
.macOS(.v10_14)
.macOS(.v10_15)
],
dependencies: [
.package(name: "Apollo", path: ".."),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "0.3.0"),
.package(url: "https://github.com/eneko/SourceDocs.git", .upToNextMinor(from: "1.2.0"))
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.0.2")),
.package(url: "https://github.com/eneko/SourceDocs.git", .upToNextMinor(from: "2.0.0"))
],
targets: [
.target(name: "Codegen",
Expand Down
9 changes: 9 additions & 0 deletions docs/source/api/Apollo/enums/CachePolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,12 @@ case returnCacheDataAndFetch
```

Return data from the cache if available, and always fetch results from the server.

## Properties
### `default`

```swift
public static var `default`: CachePolicy = .returnCacheDataElseFetch
```

The current default cache policy.
32 changes: 32 additions & 0 deletions docs/source/api/Apollo/extensions/NetworkTransport.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,44 @@ public extension NetworkTransport
```

## Properties
### `headerFieldNameApolloClientName`

```swift
static var headerFieldNameApolloClientName: String
```

The field name for the Apollo Client Name header

### `headerFieldNameApolloClientVersion`

```swift
static var headerFieldNameApolloClientVersion: String
```

The field name for the Apollo Client Version header

### `defaultClientName`

```swift
static var defaultClientName: String
```

The default client name to use when setting up the `clientName` property

### `clientName`

```swift
var clientName: String
```

### `defaultClientVersion`

```swift
static var defaultClientVersion: String
```

The default client version to use when setting up the `clientVersion` property.

### `clientVersion`

```swift
Expand Down
13 changes: 13 additions & 0 deletions docs/source/api/Apollo/protocols/GraphQLFragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,16 @@
```swift
public protocol GraphQLFragment: GraphQLSelectionSet
```

## Properties
### `fragmentDefinition`

```swift
static var fragmentDefinition: String
```

### `possibleTypes`

```swift
static var possibleTypes: [String]
```
6 changes: 6 additions & 0 deletions docs/source/api/Apollo/protocols/GraphQLSelectionSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ public protocol GraphQLSelectionSet
```

## Properties
### `selections`

```swift
static var selections: [GraphQLSelection]
```

### `resultMap`

```swift
Expand Down
8 changes: 8 additions & 0 deletions docs/source/api/Apollo/structs/GraphQLFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ public let fileURL: URL?
public let contentLength: UInt64
```

### `octetStreamMimeType`

```swift
public static let octetStreamMimeType = "application/octet-stream"
```

A convenience constant for declaring your mimetype is octet-stream.

## Methods
### `init(fieldName:originalName:mimeType:data:)`

Expand Down
9 changes: 9 additions & 0 deletions docs/source/api/ApolloAPI/enums/GraphQLEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ The underlying enum case. If the value is `__unknown`, this will be `nil`.
public var rawValue: String
```

### `allCases`

```swift
public static var allCases: [GraphQLEnum<T>]
```

A collection of all known values of the wrapped enum.
This collection does not include the `__unknown` case.

## Methods
### `init(_:)`

Expand Down
7 changes: 7 additions & 0 deletions docs/source/api/ApolloAPI/protocols/AnySelectionSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@
```swift
public protocol AnySelectionSet: ResponseObject
```

## Properties
### `selections`

```swift
static var selections: [Selection]
```
6 changes: 6 additions & 0 deletions docs/source/api/ApolloAPI/protocols/SchemaObjectType.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ public protocol SchemaObjectType: SchemaTypeEnum
```

## Properties
### `unknownCase`

```swift
static var unknownCase: Self
```

### `implementedInterfaces`

```swift
Expand Down
11 changes: 11 additions & 0 deletions docs/source/api/ApolloAPI/protocols/SelectionSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,14 @@
```swift
public protocol SelectionSet: ResponseObject, Equatable
```

## Properties
### `__parentType`

```swift
static var __parentType: SelectionSetType<Schema>
```

The GraphQL type for the `SelectionSet`.

This may be a concrete type (`ConcreteType`) or an abstract type (`Interface`).
4 changes: 2 additions & 2 deletions docs/source/api/ApolloCodegenLib/classes/JavaScriptError.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# `JavaScriptError`

```swift
public class JavaScriptError: JavaScriptObject, Error
public class JavaScriptError: JavaScriptObject, Error, @unchecked Sendable
```

An errror thrown during JavaScript execution.
An error thrown during JavaScript execution.
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ case typescript
```

The default, tried and true code generation engine

## Properties
### `default`

```swift
public static var `default`: CodeGenerationEngine
```

The current default for the code generation engine.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Designated initializer.
- outputFormat: The `OutputFormat` enum option to use to output generated code.
- customScalarFormat: How to handle properties using a custom scalar from the schema.
- suppressSwiftMultilineStringLiterals: Don't use multi-line string literals when generating code. Defaults to false.
- urlToSchemaFile: The URL to your schema file.
- urlToSchemaFile: The URL to your schema file. Accepted file types are `.json` for JSON files, or either `.graphqls` or `.sdl` for Schema Definition Language files.
- downloadTimeout: The maximum time to wait before indicating that the download timed out, in seconds. Defaults to 30 seconds.

### `init(targetRootURL:codegenEngine:downloadTimeout:)`
Expand Down
10 changes: 10 additions & 0 deletions docs/source/api/ApolloCodegenLib/structs/CodegenLogger.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ public struct CodegenLogger

Helper to get logs printing to stdout so they can be read from the command line.

## Properties
### `level`

```swift
public static var level = LogLevel.debug
```

The `LogLevel` at which to print logs. Higher raw values than this will
be ignored. Defaults to `debug`.

## Methods
### `log(_:logLevel:file:line:)`

Expand Down
1 change: 1 addition & 0 deletions docs/source/api/ApolloSQLite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

## Extensions

- [SQLiteDatabase](extensions/SQLiteDatabase/)
- [SQLiteNormalizedCache](extensions/SQLiteNormalizedCache/)

This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs)
31 changes: 31 additions & 0 deletions docs/source/api/ApolloSQLite/extensions/SQLiteDatabase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
**EXTENSION**

# `SQLiteDatabase`
```swift
public extension SQLiteDatabase
```

## Properties
### `tableName`

```swift
static var tableName: String
```

### `idColumnName`

```swift
static var idColumnName: String
```

### `keyColumnName`

```swift
static var keyColumnName: String
```

### `recordColumName`

```swift
static var recordColumName: String
```
6 changes: 6 additions & 0 deletions docs/source/api/ApolloUtils/extensions/ApolloCompatible.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ extension ApolloCompatible
```swift
public var apollo: ApolloExtension<Self>
```

### `apollo`

```swift
public static var apollo: ApolloExtension<Self>.Type
```
8 changes: 8 additions & 0 deletions docs/source/api/ApolloUtils/protocols/ApolloCompatible.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ var apollo: ApolloExtension<Base>
```

The `ApolloExtension` object for an instance

### `apollo`

```swift
static var apollo: ApolloExtension<Base>.Type
```

The `ApolloExtension` object for a type
1 change: 1 addition & 0 deletions docs/source/api/ApolloWebSocket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

- [WSError.ErrorType](enums/WSError.ErrorType/)
- [WebSocket.OpCode](enums/WebSocket.OpCode/)
- [WebSocket.WSProtocol](enums/WebSocket.WSProtocol/)
- [WebSocketError.ErrorKind](enums/WebSocketError.ErrorKind/)

## Extensions
Expand Down
Loading

0 comments on commit 2e32b3a

Please sign in to comment.