Skip to content

Commit

Permalink
Merge pull request #1737 from deepumukundan/patch-1
Browse files Browse the repository at this point in the history
Apply cache policy case .default  in fetch and watch
  • Loading branch information
designatednerd authored Apr 1, 2021
2 parents fcb2ce6 + 44275c3 commit e2be065
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 e2be065

Please sign in to comment.