Skip to content

Commit

Permalink
Updated name to match other protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
kimdv committed Sep 19, 2019
1 parent 6fd8c8e commit beaa094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Apollo/HTTPNetworkTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public protocol HTTPNetworkTransportRetryDelegate: HTTPNetworkTransportDelegate
}

/// Methods which will be called after some kind of response has been received and it contains GraphQLErrors
public protocol NetworkGraphQLErrorDelegate: HTTPNetworkTransportDelegate {
public protocol HTTPNetworkTransportGraphQLErrorDelegate: HTTPNetworkTransportDelegate {


/// Called when response contains one or more GraphQL errors.
Expand Down Expand Up @@ -195,7 +195,7 @@ public class HTTPNetworkTransport {
files: [GraphQLFile]?,
response: GraphQLResponse<Operation>,
completionHandler: @escaping (_ result: Result<GraphQLResponse<Operation>, Error>) -> Void) throws {
guard let delegate = self.delegate as? NetworkGraphQLErrorDelegate,
guard let delegate = self.delegate as? HTTPNetworkTransportGraphQLErrorDelegate,
let graphQLErrors = response.parseErrorsOnlyFast(),
!graphQLErrors.isEmpty else {
completionHandler(.success(response))
Expand Down

0 comments on commit beaa094

Please sign in to comment.