Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disfavour deprecated watch function #469

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

calvincestari
Copy link
Member

When the watch(query:cachePolicy:context:callbackQueue:resultHandler:) function was deprecated the new function introduced a single new parameter with a default which meant that using the minimally required parameters to call the function (watch(query:resultHandler:)) matches both signatures. This generates a perpetual deprecation warning with no way to get rid of it other than to use the new refetchOnFailedUpdates parameter in the function call.

Marking the deprecated function with @_disfavoredOverload allows the minimally required function call to be used again without the deprecation warning. I'm really surprised that nobody has complained about this before.

Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit b666f33
🔍 Latest deploy log https://app.netlify.com/sites/apollo-ios-docc/deploys/66c91ee4dce20b0008ddb68f

Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for eclectic-pie-88a2ba canceled.

Name Link
🔨 Latest commit b666f33
🔍 Latest deploy log https://app.netlify.com/sites/eclectic-pie-88a2ba/deploys/66c91ee4e2cd2000087ab393

@calvincestari calvincestari merged commit 0fe0ce9 into main Aug 26, 2024
38 checks passed
@calvincestari calvincestari deleted the fix/watch-deprecated-override branch August 26, 2024 16:45
BobaFetters pushed a commit that referenced this pull request Aug 26, 2024
BobaFetters pushed a commit to apollographql/apollo-ios that referenced this pull request Aug 26, 2024
BobaFetters pushed a commit that referenced this pull request Aug 26, 2024
05947e55 fix: Disfavour deprecated `watch` function (#469)

git-subtree-dir: apollo-ios
git-subtree-split: 05947e550ae3f310642e7d1ea1340a14023eab75
BobaFetters pushed a commit that referenced this pull request Aug 26, 2024
git-subtree-dir: apollo-ios
git-subtree-mainline: d585d38
git-subtree-split: 05947e550ae3f310642e7d1ea1340a14023eab75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants