From dda6fd1051ffe9629667a2a3c21e2e9c1d9bcf48 Mon Sep 17 00:00:00 2001 From: Jay Herron Date: Sun, 17 May 2026 16:58:34 -0600 Subject: [PATCH] chore!: Remove deprecated String listen --- Sources/GraphQLTransportWS/Client.swift | 14 -------------- Sources/GraphQLTransportWS/Server.swift | 15 --------------- 2 files changed, 29 deletions(-) diff --git a/Sources/GraphQLTransportWS/Client.swift b/Sources/GraphQLTransportWS/Client.swift index ca15d84..3012143 100644 --- a/Sources/GraphQLTransportWS/Client.swift +++ b/Sources/GraphQLTransportWS/Client.swift @@ -45,20 +45,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/GraphQLTransportWS/Server.swift b/Sources/GraphQLTransportWS/Server.swift index 803f798..f270f9f 100644 --- a/Sources/GraphQLTransportWS/Server.swift +++ b/Sources/GraphQLTransportWS/Server.swift @@ -65,21 +65,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 {