-
Notifications
You must be signed in to change notification settings - Fork 660
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
Deprecate all intermediate Builder
functions
#6287
base: main
Are you sure you want to change the base?
Conversation
✅ Docs Preview ReadyNo new or changed pages found. |
actual class DefaultWebSocketEngine( | ||
private val webSocketFactory: WebSocket.Factory, | ||
webSocketFactory: () -> WebSocket.Factory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New constructor. We need that to avoid initializing from the main thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More explicit > less explicit 👍
"com.apollographql.apollo.network.ws.WebSocketNetworkTransport" | ||
) | ||
) | ||
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_1_1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry a bit about this one in particular as it's probably one the most often used, and the replacement expression is a bit of mouthful... But I agree about the tradeoff, it's for the better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a fair point. We don't want to become the capitalized()
of GraphQL... Will think more about this
50f9762
to
3276c57
Compare
Deprecate things like
Those are properties of
HttpNetworkTransport
andWebSocketNetworkTransport
respectively and what we gain in the "simple" cases is outweight by the complexity induced (more docs, impossible states, bad error messages (#6253), etc...).I am now convinced that precedence rules are clumsy, and this PR removes a lot of the precedence.
The code above can be replaced by the (longer but also much more consistent and less footgunny) version:
I just kept
serverUrl()
because it's used everywhere in the docs.