Skip to content

Commit

Permalink
Fix watch signature
Browse files Browse the repository at this point in the history
  • Loading branch information
BoD committed Feb 21, 2023
1 parent aa08587 commit 9c9da5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ fun ApolloClient.Builder.store(store: ApolloStore, writeToCacheAsynchronously: B
fun <D : Query.Data> ApolloCall<D>.watch(
fetchThrows: Boolean,
refetchThrows: Boolean,
): Nothing = throw UnsupportedOperationException("watch(fetchThrows: Boolean, refetchThrows: Boolean) is no longer supported, use watch() instead")
): Flow<ApolloResponse<D>> = throw UnsupportedOperationException("watch(fetchThrows: Boolean, refetchThrows: Boolean) is no longer supported, use watch() instead")

@Deprecated(level = DeprecationLevel.ERROR, message = "Exceptions no longer throw", replaceWith = ReplaceWith("watch()"))
@ApolloDeprecatedSince(v4_0_0)
@Suppress("UNUSED_PARAMETER")
fun <D : Query.Data> ApolloCall<D>.watch(
fetchThrows: Boolean,
): Nothing = throw UnsupportedOperationException("watch(fetchThrows: Boolean, refetchThrows: Boolean) is no longer supported, use watch() instead")
): Flow<ApolloResponse<D>> = throw UnsupportedOperationException("watch(fetchThrows: Boolean, refetchThrows: Boolean) is no longer supported, use watch() instead")

/**
* Gets the result from the network, then observes the cache for any changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ fun ApolloClient.Builder.store(store: ApolloStore, writeToCacheAsynchronously: B
fun <D : Query.Data> ApolloCall<D>.watch(
fetchThrows: Boolean,
refetchThrows: Boolean,
): Nothing = throw UnsupportedOperationException("watch(fetchThrows: Boolean, refetchThrows: Boolean) is no longer supported, use watch() instead")
): Flow<ApolloResponse<D>> = throw UnsupportedOperationException("watch(fetchThrows: Boolean, refetchThrows: Boolean) is no longer supported, use watch() instead")

@Deprecated(level = DeprecationLevel.ERROR, message = "Exceptions no longer throw", replaceWith = ReplaceWith("watch()"))
@ApolloDeprecatedSince(v4_0_0)
@Suppress("UNUSED_PARAMETER")
fun <D : Query.Data> ApolloCall<D>.watch(
fetchThrows: Boolean,
): Nothing = throw UnsupportedOperationException("watch(fetchThrows: Boolean, refetchThrows: Boolean) is no longer supported, use watch() instead")
): Flow<ApolloResponse<D>> = throw UnsupportedOperationException("watch(fetchThrows: Boolean, refetchThrows: Boolean) is no longer supported, use watch() instead")

/**
* Gets the result from the network, then observes the cache for any changes.
Expand Down

0 comments on commit 9c9da5c

Please sign in to comment.