Skip to content

Commit 9644a10

Browse files
committed
Expose cache policy directive to refetch callers
1 parent 6667c6d commit 9644a10

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/Apollo/GraphQLQueryWatcher.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public final class GraphQLQueryWatcher<Query: GraphQLQuery>: Cancellable, Apollo
3939
}
4040

4141
/// Refetch a query from the server.
42-
public func refetch() {
43-
fetch(cachePolicy: .fetchIgnoringCacheData)
42+
public func refetch(cachePolicy: CachePolicy = .fetchIgnoringCacheData) {
43+
fetch(cachePolicy: cachePolicy)
4444
}
4545

4646
func fetch(cachePolicy: CachePolicy) {

0 commit comments

Comments
 (0)