github apollographql/apollo-kotlin v2.5.2

latest releases: v4.0.1, v4.0.0, v4.0.0-rc.2...
3 years ago

Version 2.5.2 fixes a bunch of bugs and adds ApolloAndroidLogger and AppSyncOperationMessageSerializer. Huge thanks to @AdamMc331 and @ansman for their respective work on the logger and serializer 🙌 !

Note: version 2.5.2 is released from Github actions and that took a few iterations to get right. As a result, version 2.5.0 and 2.5.1 were not published and will never be.

ApolloAndroidLogger

ApolloAndroidLogger is a logger that will send its output to Logcat. Use it to display debug information on Android devices:

ApolloClient.builder()
            .logger(ApolloAndroidLogger())
            [...]
            .build

AppSyncOperationMessageSerializer

AppSyncOperationMessageSerializer is a serializer that can understand the AWS AppSync message format. Pass it to your WebSocketSubscriptionTransport.Factory:

// This example uses an API key. See the AppSync documentation for information on what to pass
val authorization = mapOf(
    "host" to "example1234567890000.appsync-api.us-east-1.amazonaws.com",
    "x-api-key" to "da2-12345678901234567890123456"
)

val webSocketUrl = AppSyncOperationMessageSerializer.buildWebSocketUrl(
    baseWebSocketUrl = "wss://example1234567890000.appsync-realtime-api.us-east-1.amazonaws.com/graphql",
    authorization = authorization
)

val subscriptionTransportFactory = WebSocketSubscriptionTransport.Factory(
    webSocketUrl = webSocketUrl,
    webSocketConnectionFactory = okHttpClient,
    serializer = AppSyncOperationMessageSerializer(authorization)
)

apolloClient.builder()
    .subscriptionTransportFactory(subscriptionTransportFactory)
    .build()

Full Changelog

  • [Android Support] Adding ApolloAndroidLogger to apollo-android-support. (#2824)
  • [Build scripts] Better UP-TO-DATE checks (#2817)
  • [Build scripts] Ignore Android modules during Gradle sync. (#2811)
  • [Runtime] fix binary compatibility (#2812)
  • [Runtime] Implement support for AWS AppSync in WebSocketSubscriptionTransport (#2809)
  • [Gradle plugin] For recent versions of Gradle, use .convention to provide the default (#2803)
  • [Runtime] Fix watcher clone (#2795)
  • [Runtime] support null arguments (#2805)
  • [Compiler] do not choke on "repeated" directive. (#2785)

Don't miss a new apollo-kotlin release

NewReleases is sending notifications on new releases.