diff --git a/Sources/GraphQLWS/Client.swift b/Sources/GraphQLWS/Client.swift index 9904698..c7c4ff9 100644 --- a/Sources/GraphQLWS/Client.swift +++ b/Sources/GraphQLWS/Client.swift @@ -57,20 +57,6 @@ public actor Client { } } - /// Listen and react to the provided async sequence of server messages. This function will block until the stream is completed. - /// - Parameter incoming: The server message sequence that the client should react to. - @available(*, deprecated, message: "Use `Data` sequence instead.") - public func listen(to incoming: A) async throws - where A.Element == String { - for try await stringMessage in incoming { - guard let message = stringMessage.data(using: .utf8) else { - try await self.error(.invalidEncoding()) - return - } - try await respond(to: message) - } - } - private func respond(to message: Data) async throws { let response: Response do { diff --git a/Sources/GraphQLWS/Server.swift b/Sources/GraphQLWS/Server.swift index 3dc5f7f..c831e68 100644 --- a/Sources/GraphQLWS/Server.swift +++ b/Sources/GraphQLWS/Server.swift @@ -52,7 +52,7 @@ where self.onOperationComplete = onOperationComplete self.onOperationError = onOperationError } - + deinit { subscriptionTasks.values.forEach { $0.cancel() } } @@ -66,21 +66,6 @@ where } } - /// Listen and react to the provided async sequence of client messages. This function will block until the stream is completed. - /// - Parameter incoming: The client message sequence that the server should react to. - @available(*, deprecated, message: "Use `Data` sequence instead.") - public func listen(to incoming: A) async throws - where A.Element == String { - for try await stringMessage in incoming { - guard let message = stringMessage.data(using: .utf8) else { - try await error(.invalidEncoding()) - return - } - - try await respond(to: message) - } - } - private func respond(to message: Data) async throws { let request: Request do {