Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

v5.0.0-alpha.3

Latest

Choose a tag to compare

@martinbonninmartinbonnin released this 13 Nov 17:33
· 7 commits to main since this release
5ce88bc
This commit was created on GitHub.com and signed with GitHub’sverified signature.
GPG key ID:B5690EEEBB952194
Verified
Learn about vigilant mode.

@stream support

You may now use@stream to stream list responses from a compatible server.

To do this, opt in support for theincremental:v0.2 protocol:

val apolloClient=ApolloClient.Builder()    .networkTransport(HttpNetworkTransport.Builder()            .serverUrl("http://example.com/graphql")            .incrementalDeliveryProtocol(IncrementalDeliveryProtocol.V0_2)            .build()    )    .build()

Using@defer and@stream will stay opt-in until the RFC is merged.

Experimental WebSockets are stable

Theexperimental WebSockets are promoted to stable. In particular, therequest url may now be changed in interceptors. This can be used together withRetryStrategy to change the authentication parameters when retrying a subscription. The previous implementation (using thecom.apollographql.apollo.ws package name) is now deprecated.

Read more in themigration guide.

Leveraging OkHttp cache

You can now use OkHttpcacheUrlOverride() to cache POST requests.

To do so,configure a cache on your OkHttpClient and useenablePostCaching:

val apolloClient=ApolloClient.Builder()    .networkTransport(HttpNetworkTransport.Builder()// Enable POST caching            .httpRequestComposer(DefaultHttpRequestComposer(serverUrl= mockServer.url(), enablePostCaching=true))            .httpEngine(DefaultHttpEngine {OkHttpClient.Builder()                      .cache(directory=File(application.cacheDir,"http_cache"), maxSize=10_000_000)                      .build()                }            )            .build()    )    .build()

The existingapollo-http-cache artifacts have been deprecated. Moving forward, leveraging the cache of existing clients (OkHttp, Ktor, etc...) is the recommended way to do caching at the HTTP layer.

Read more in themigration guide.

AGP9 support

The Gradle plugin now works with AGP 9 and thecom.android.kotlin.multiplatform.library plugin.

Service.issueSeverity()

You may now control the severity of issues found by the compiler in your Gradle scripts:

service("service") {   packageName.set("com.example")// Do not fail the build on unused fragments// Valid values are the names of the subclasses of `com.apollographql.apollo.ast.Issue`  issueSeverity("UnusedFragment","warn") }

👷‍♂️ All changes

Contributors

  • @JakeWharton
  • @calvincestari
  • @hrach
  • @BoD
  • @martinbonnin
JakeWharton, calvincestari, and 3 other contributors
Assets2
Loading
sebj reacted with hooray emojiStijnDRZP, egorshr, and ReneHaddad reacted with rocket emoji
4 people reacted

[8]ページ先頭

©2009-2025 Movatter.jp