Skip to content

Builders management #6301

Open
Open
@martinbonnin

Description

@martinbonnin

Description

Follow up from #3301, we should uniformize our Builder patterns. ApolloClient.Builder() especially has a bunch of Builder "shortcuts" that seemed interesting at first but end up creating issues:

TODO:

  • deprecate (and ultimately remove) the intermediate builders
  • add ApolloClient.Builder.normalizedCacheInterceptor(), like there is retryInterceptor()
  • add ApolloClient.Builder.httpCacheInterceptor(), like there is retryInterceptor()
  • decide what to do with HttpNetworkTransport.newBuilder(). It could potentially be dangerous to create multiple instance sharing a single closeable resource. But it's possible anyways by reusing the original builder so we might as well decide to keep it with a bit warning.
  • Add Kotlin builder-DSL helpers
  • update docs

See #6287
See #6300

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions