Network Rearchitecture#1341
Conversation
6172015 to
df6024d
Compare
91c9c47 to
0bde055
Compare
6af46dc to
515b1db
Compare
| import Foundation | ||
|
|
||
| /// An error interceptor called to allow further examination of error data when an error occurs in the chain. | ||
| public protocol ApolloErrorInterceptor { |
There was a problem hiding this comment.
I'm not sure if it would work, but what do you think of instead using protocol for this interceptor, actually, use just a function. For instance,
typealias ApolloErrorInterceptor = (Error,
RequestChain,
HTTPRequest<Operation>,
HTTPResponse<Operation>?,
@escaping (Result<GraphQLResult<Operation.Data>, Error>) -> Void)) -> VoidThere was a problem hiding this comment.
I would wayyyyyy rather have this as a protocol, particularly since it gives longer term flexibility to add more methods if needed.
af574ef to
1dd71de
Compare
| extension GraphQLResult where Data: Decodable { | ||
|
|
||
| public init<T: FlexibleDecoder>(from data: Foundation.Data, decoder: T) throws { | ||
| // SWIFT CODEGEN: fix this to handle codable better |
There was a problem hiding this comment.
Thoroughly punting on this for now.
|
A preview of the updated networking setup instructions can be found here. Going to be updating the tutorial portion dealing with these changes before cutting a beta. Would love feedback! |
ca3b14d to
385be42
Compare
…dedupe callbacks for the watcher.
…entifier for watcher context vs identifier for actual URLSessionTask
…lo store subscriber for future reference
… retry interceptor
… with request chain
385be42 to
38135ee
Compare
|
OK, pointing this at |
This PR relates to the RFC for the new networking stack - this branch is basically where I've been doing explorations thus far.