Skip to content

Commit dda6fd1

Browse files
chore!: Remove deprecated String listen
1 parent 2b3ff39 commit dda6fd1

2 files changed

Lines changed: 0 additions & 29 deletions

File tree

Sources/GraphQLTransportWS/Client.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,6 @@ public actor Client<InitPayload: Equatable & Codable> {
4545
}
4646
}
4747

48-
/// Listen and react to the provided async sequence of server messages. This function will block until the stream is completed.
49-
/// - Parameter incoming: The server message sequence that the client should react to.
50-
@available(*, deprecated, message: "Use `Data` sequence instead.")
51-
public func listen<A: AsyncSequence & Sendable>(to incoming: A) async throws
52-
where A.Element == String {
53-
for try await stringMessage in incoming {
54-
guard let message = stringMessage.data(using: .utf8) else {
55-
try await self.error(.invalidEncoding())
56-
return
57-
}
58-
try await respond(to: message)
59-
}
60-
}
61-
6248
private func respond(to message: Data) async throws {
6349
let response: Response
6450
do {

Sources/GraphQLTransportWS/Server.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,6 @@ where
6565
}
6666
}
6767

68-
/// Listen and react to the provided async sequence of client messages. This function will block until the stream is completed.
69-
/// - Parameter incoming: The client message sequence that the server should react to.
70-
@available(*, deprecated, message: "Use `Data` sequence instead.")
71-
public func listen<A: AsyncSequence & Sendable>(to incoming: A) async throws
72-
where A.Element == String {
73-
for try await stringMessage in incoming {
74-
guard let message = stringMessage.data(using: .utf8) else {
75-
try await error(.invalidEncoding())
76-
return
77-
}
78-
79-
try await respond(to: message)
80-
}
81-
}
82-
8368
private func respond(to message: Data) async throws {
8469
let request: Request
8570
do {

0 commit comments

Comments
 (0)