File tree Expand file tree Collapse file tree 5 files changed +8
-7
lines changed
Tests/GraphQLWSTests/Utils Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -27,5 +27,6 @@ let package = Package(
27
27
name: " GraphQLWSTests " ,
28
28
dependencies: [ " GraphQLWS " ]
29
29
) ,
30
- ]
30
+ ] ,
31
+ swiftLanguageVersions: [ . v5, . version( " 6 " ) ]
31
32
)
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ struct GraphQLWSError: Error {
88
88
}
89
89
90
90
/// Error codes for miscellaneous issues
91
- public enum ErrorCode : Int , CustomStringConvertible {
91
+ public enum ErrorCode : Int , CustomStringConvertible , Sendable {
92
92
// Miscellaneous
93
93
case miscellaneous = 4400
94
94
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import GraphQL
4
4
/// Server implements the server-side portion of the protocol, allowing a few callbacks for customization.
5
5
///
6
6
/// By default, there are no authorization checks
7
- public class Server < InitPayload: Equatable & Codable > {
7
+ public class Server < InitPayload: Equatable & Codable > : @ unchecked Sendable {
8
8
// We keep this weak because we strongly inject this object into the messenger callback
9
9
weak var messenger : Messenger ?
10
10
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ struct TestAPI: API {
16
16
}
17
17
}
18
18
19
- final class TestContext {
19
+ final class TestContext : Sendable {
20
20
let publisher = SimplePubSub < String > ( )
21
21
22
22
func hello( ) -> String {
@@ -35,7 +35,7 @@ struct TestResolver {
35
35
}
36
36
37
37
/// A very simple publish/subscriber used for testing
38
- class SimplePubSub < T> {
38
+ class SimplePubSub < T: Sendable > : @ unchecked Sendable {
39
39
private var subscribers : [ Subscriber < T > ]
40
40
41
41
init ( ) {
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ import Foundation
7
7
///
8
8
/// Note that this only retains a weak reference to 'other', so the client should retain references
9
9
/// or risk them being deinitialized early
10
- class TestMessenger : Messenger {
10
+ class TestMessenger : Messenger , @ unchecked Sendable {
11
11
weak var other : TestMessenger ?
12
12
var onReceive : ( String ) async throws -> Void = { _ in }
13
13
let queue : DispatchQueue = . init( label: " Test messenger " )
14
14
15
15
init ( ) { }
16
16
17
- func send< S> ( _ message: S ) async throws where S: Collection , S. Element == Character {
17
+ func send< S: Sendable > ( _ message: S ) async throws where S: Collection , S. Element == Character {
18
18
guard let other = other else {
19
19
return
20
20
}
You can’t perform that action at this time.
0 commit comments