Skip to content

Commit e049374

Browse files
remove now-unused method
1 parent c70f98a commit e049374

1 file changed

Lines changed: 0 additions & 36 deletions

File tree

Sources/Apollo/ApolloClient.swift

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -71,42 +71,6 @@ public class ApolloClient {
7171

7272
self.init(networkTransport: transport, store: store)
7373
}
74-
75-
private func handleOperationResult<Data: GraphQLSelectionSet>(shouldPublishResultToStore: Bool,
76-
_ result: Result<GraphQLResponse<Data>, Error>,
77-
resultHandler: @escaping GraphQLResultHandler<Data>) {
78-
switch result {
79-
case .failure(let error):
80-
resultHandler(.failure(error))
81-
case .success(let response):
82-
// If there is no need to publish the result to the store, we can use a fast path.
83-
if !shouldPublishResultToStore {
84-
do {
85-
let result = try response.parseResultFast()
86-
resultHandler(.success(result))
87-
} catch {
88-
resultHandler(.failure(error))
89-
}
90-
return
91-
}
92-
93-
firstly {
94-
try response.parseResult(cacheKeyForObject: self.cacheKeyForObject)
95-
}.andThen { [weak self] (result, records) in
96-
guard let self = self else {
97-
return
98-
}
99-
if let records = records {
100-
self.store.publish(records: records).catch { error in
101-
preconditionFailure(String(describing: error))
102-
}
103-
}
104-
resultHandler(.success(result))
105-
}.catch { error in
106-
resultHandler(.failure(error))
107-
}
108-
}
109-
}
11074
}
11175

11276
// MARK: - ApolloClientProtocol conformance

0 commit comments

Comments
 (0)