Skip to content

Conversation

@martinbonnin
Copy link
Contributor

@martinbonnin martinbonnin commented Nov 3, 2025

See #5862 (comment)

In addition to the new API, this:

  • stabilizes the retry API. It's been around for more than 1 year now. Might as well consider it stable. I'm still not 100% certain we reached the end of the road. There are a lot of heuristics down there and finding the good default that is also flexible is not easy but for the sake of moving forward, let's commit to this and go through deprecation cycles if we ever need to change.
  • embraces the subscription vs query differences. I think most subscriptions want to be retried when it's not always the case for queries. The default retry behaviour is now to retry forever for subscriptions and give up after 7 seconds for queries.

@martinbonnin martinbonnin requested a review from BoD as a code owner November 3, 2025 09:29
@apollo-librarian
Copy link

apollo-librarian bot commented Nov 3, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 1 changed, 0 removed
* (developer-tools)/kotlin/v5/advanced/network-connectivity.mdx

Build ID: c66ffb3af42adffc92e7a920
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/c66ffb3af42adffc92e7a920

*/
return this is ApolloNetworkException
return when (this) {
is ApolloNetworkException,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC OfflineApolloException (which is a ApolloNetworkException) should be excluded here, otherwise we retry when we should fail fast if offline

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I'll do something about it 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright so I changed everything 😅 . Initial description updated.

@martinbonnin martinbonnin changed the title RetryOnError: allow to customize what exceptions are considered recoverable Introduce RetryDelegate Nov 3, 2025
@martinbonnin martinbonnin requested a review from a team as a code owner November 3, 2025 22:50
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.

3 participants