Skip to content

Commit da1a10d

Browse files
authored
Xcode26 update (#756)
1 parent 28b0c8f commit da1a10d

5 files changed

Lines changed: 19 additions & 18 deletions

File tree

Sources/Apollo/ApolloClient.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
import Dispatch
21
import Foundation
32
import ApolloAPI
43

5-
public struct RequestConfiguration: Sendable {
6-
public var requestTimeout: TimeInterval?
7-
public var writeResultsToCache: Bool
8-
9-
public init(
10-
requestTimeout: TimeInterval? = nil,
11-
writeResultsToCache: Bool = true
12-
) {
13-
self.requestTimeout = requestTimeout
14-
self.writeResultsToCache = writeResultsToCache
15-
}
16-
}
17-
184
// MARK: -
195

206
/// `ApolloClient` is the primary public entry point for interacting with a GraphQL server and a local GraphQL

Sources/Apollo/ApolloStore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ public final class ApolloStore: Sendable {
438438
/// Defaults to nil.
439439
@available(*, deprecated, renamed: "withinReadWriteTransaction(_:)")
440440
public func withinReadWriteTransaction<T: Sendable>(
441-
_ body: @escaping @Sendable (ReadWriteTransaction) throws -> T,
441+
_ body: @escaping @Sendable (ReadWriteTransaction) async throws -> T,
442442
callbackQueue: DispatchQueue? = nil,
443443
completion: (@Sendable (Result<T, any Swift.Error>) -> Void)? = nil
444444
) {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Foundation
2+
3+
public struct RequestConfiguration: Sendable {
4+
public var requestTimeout: TimeInterval?
5+
public var writeResultsToCache: Bool
6+
7+
public init(
8+
requestTimeout: TimeInterval? = nil,
9+
writeResultsToCache: Bool = true
10+
) {
11+
self.requestTimeout = requestTimeout
12+
self.writeResultsToCache = writeResultsToCache
13+
}
14+
}

Sources/ApolloAPI/AnySendableHashable.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ extension Hasher {
6565
@inlinable
6666
public mutating func combine(_ optionalJSONValue: (any Sendable & Hashable)?) {
6767
if let value = optionalJSONValue {
68-
self.combine(value)
68+
self.combine(1 as UInt8)
69+
self.combine(value)
6970
} else {
7071
// This mimics the implementation of combining a nil optional from the Swift language core
7172
// Source reference at:
72-
// https://github.com/swiftlang/swift/blob/main/stdlib/public/core/Optional.swift#L554-L557
73+
// https://github.com/swiftlang/swift/blob/main/stdlib/public/core/Optional.swift#L590
7374
self.combine(0 as UInt8)
7475
}
7576
}

Sources/ApolloAPI/SchemaConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
///
33
/// A ``SchemaConfiguration`` provides an entry point for customizing the cache key resolution
44
/// for the types in the schema, which is used by `NormalizedCache` mechanisms.
5-
public protocol SchemaConfiguration {
5+
public protocol SchemaConfiguration: Sendable {
66
/// The entry point for configuring the cache key resolution
77
/// for the types in the schema, which is used by `NormalizedCache` mechanisms.
88
///

0 commit comments

Comments
 (0)