You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Watches a query by first fetching an initial result from the server or from the local cache, depending on the current contents of the cache and the specified cache policy. After the initial fetch, the returned query watcher object will get notified whenever any of the data the query result depends on changes in the local cache, and calls the result handler again with the new result.
36
36
///
37
37
/// - Parameters:
38
38
/// - query: The query to fetch.
39
-
/// - fetchHTTPMethod: The HTTP Method to be used.
40
39
/// - cachePolicy: A cache policy that specifies when results should be fetched from the server or from the local cache.
41
-
/// - queue: A dispatch queue on which the result handler will be called. Should default to the main queue.
42
40
/// - resultHandler: [optional] A closure that is called when query results are available or when an error occurs.
43
41
/// - Returns: A query watcher object that can be used to control the watching behavior.
/// Uploads the given files with the given operation.
63
58
///
64
59
/// - Parameters:
65
60
/// - operation: The operation to send
66
-
/// - context: [optional] A context to use for the cache to work with results. Should default to nil.
67
61
/// - files: An array of `GraphQLFile` objects to send.
68
62
/// - queue: A dispatch queue on which the result handler will be called. Should default to the main queue.
69
-
/// - completionHandler: The completion handler to execute when the request completes or errors
63
+
/// - completionHandler: The completion handler to execute when the request completes or errors. Note that an error will be returned If your `networkTransport` does not also conform to `UploadingNetworkTransport`.
70
64
/// - Returns: An object that can be used to cancel an in progress request.
71
-
/// - Throws: If your `networkTransport` does not also conform to `UploadingNetworkTransport`.
/// An error interceptor called to allow further examination of error data when an error occurs in the chain.
4
+
publicprotocolApolloErrorInterceptor{
5
+
6
+
/// Asynchronously handles the receipt of an error at any point in the chain.
7
+
///
8
+
/// - Parameters:
9
+
/// - error: The received error
10
+
/// - chain: The chain the error was received on
11
+
/// - request: The request, as far as it was constructed
12
+
/// - response: [optional] The response, if one was received
13
+
/// - completion: The completion closure to fire when the operation has completed. Note that if you call `retry` on the chain, you will not want to call the completion block in this method.
0 commit comments