Skip to content

Commit 611d945

Browse files
chore: Remove Swift 6 warnings
1 parent 7fc8b83 commit 611d945

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Sources/GraphQL/Execution/Values.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func getVariableValue(
8888
definitionAST: VariableDefinition,
8989
input: Map
9090
) throws -> Map {
91-
var type = typeFromAST(schema: schema, inputTypeAST: definitionAST.type)
91+
let type = typeFromAST(schema: schema, inputTypeAST: definitionAST.type)
9292
let variable = definitionAST.variable
9393

9494
guard let inputType = type as? GraphQLInputType else {

Sources/GraphQL/GraphQL.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import NIO
22

3-
public struct GraphQLResult: Equatable, Codable, CustomStringConvertible {
3+
public struct GraphQLResult: Equatable, Codable, Sendable, CustomStringConvertible {
44
public var data: Map?
55
public var errors: [GraphQLError]
66

Sources/GraphQL/Map/Map.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public enum MapError: Error {
1111

1212
// MARK: Map
1313

14-
public enum Map {
14+
public enum Map: Sendable {
1515
case undefined
1616
case null
1717
case bool(Bool)
@@ -600,7 +600,7 @@ public extension Map {
600600
}
601601
}
602602

603-
extension String: CodingKey {
603+
extension Swift.String: Swift.CodingKey {
604604
public var stringValue: String {
605605
return self
606606
}

Sources/GraphQL/Map/Number.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Foundation
1+
@preconcurrency import Foundation
22

3-
public struct Number {
4-
public enum StorageType {
3+
public struct Number: Sendable {
4+
public enum StorageType: Sendable {
55
case bool
66
case int
77
case double

Sources/GraphQL/Utilities/NIO+Extensions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ extension Future {
8989

9090
public protocol FutureType {
9191
associatedtype Expectation
92-
func whenSuccess(_ callback: @escaping (Expectation) -> Void)
93-
func whenFailure(_ callback: @escaping (Error) -> Void)
92+
func whenSuccess(_ callback: @escaping @Sendable (Expectation) -> Void)
93+
func whenFailure(_ callback: @escaping @Sendable (Error) -> Void)
9494
func map<NewValue>(
9595
file: StaticString,
9696
line: UInt,

Tests/GraphQLTests/SubscriptionTests/SubscriptionTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ class SubscriptionTests: XCTestCase {
2828
}
2929
"""
3030

31-
let subscriptionResult = try graphqlSubscribe(
31+
let subscriptionResult = try await graphqlSubscribe(
3232
schema: schema,
3333
request: query,
3434
eventLoopGroup: eventLoopGroup
35-
).wait()
35+
).get()
3636
guard let subscription = subscriptionResult.stream else {
3737
XCTFail(subscriptionResult.errors.description)
3838
return

0 commit comments

Comments
 (0)