Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to ensure thread safety and conformance to Swift concurrency protocols. The most important changes include updating the Swift language version, adding
Sendableconformance to various types, and ensuring thread-safe access to shared resources.Language Version Update:
Package.swift: Updated the Swift tools version from 5.7 to 6.0.Concurrency and Thread Safety:
Sources/GraphQL/AnyCodable/AnyCodable.swift: Added@unchecked Sendableconformance toAnyCodable.Sources/GraphQLWebSocket/Client.swift: ChangedGraphQLWebSocketto befinaland added@preconcurrencytoWebSocketDelegateconformance.Sources/SwiftGraphQL/Selection/Selection.swift: ModifiedFieldsclass to ensure thread-safe access to its properties using a dispatch queue and addedSendableconformance toSelectionand related types. [1] [2] [3]Protocol and Struct Conformance:
Sources/SwiftGraphQL/Document/Scalar.swift: AddedSendableconformance toGraphQLScalarandScalarDecodingError. [1] [2]Sources/SwiftGraphQLClient/Client/Operation.swift: AddedSendableconformance toOperation,OperationResult, and related types. [1] [2] [3] [4] [5] [6]Final Class and Thread Safety Enhancements:
Sources/SwiftGraphQLClient/Client/Core.swift: ChangedClientto befinaland added@unchecked Sendableconformance.Sources/SwiftGraphQLClient/Exchanges/CacheExchange.swift: Added a dispatch queue toCacheExchangefor thread-safe access to caches and made the class@unchecked Sendable. [1] [2]