Skip to content

Commit

Permalink
Apply cache policy case .default in fetch and watch
Browse files Browse the repository at this point in the history
The CachePolicy enum has a default policy but it was only used in subscribe. This updates the other 2 locations
  • Loading branch information
deepumukundan authored Mar 30, 2021
1 parent fcb2ce6 commit 44275c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Apollo/ApolloClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ extension ApolloClient: ApolloClientProtocol {
}

@discardableResult public func fetch<Query: GraphQLQuery>(query: Query,
cachePolicy: CachePolicy = .returnCacheDataElseFetch,
cachePolicy: CachePolicy = .default,
contextIdentifier: UUID? = nil,
queue: DispatchQueue = .main,
resultHandler: GraphQLResultHandler<Query.Data>? = nil) -> Cancellable {
Expand All @@ -99,7 +99,7 @@ extension ApolloClient: ApolloClientProtocol {
}

public func watch<Query: GraphQLQuery>(query: Query,
cachePolicy: CachePolicy = .returnCacheDataElseFetch,
cachePolicy: CachePolicy = .default,
callbackQueue: DispatchQueue = .main,
resultHandler: @escaping GraphQLResultHandler<Query.Data>) -> GraphQLQueryWatcher<Query> {
let watcher = GraphQLQueryWatcher(client: self,
Expand Down

0 comments on commit 44275c3

Please sign in to comment.