Skip to content

Releases: apollographql/apollo-kotlin

v5.0.0-alpha.7

07 Apr 12:39
4eeccc1

Choose a tag to compare

Compatibility release for Kotlin 2.4.0-Beta1

  • [NEW] Pass parent and parentType to FakeResolver (#6913)
  • [FIX] Compatibility with Kotlin 2.4-Beta1: Remove legacy JS target check (#6908)

Full Changelog: v5.0.0-alpha.6...v5.0.0-alpha.7

v4.4.3

07 Apr 09:45
5a78e1e

Choose a tag to compare

Compatibility release for Kotlin 2.4.0-Beta1. This release contains only a single change:

  • [FIX] Compatibility with Kotlin 2.4-Beta1: Remove legacy JS target check (#6910)

v5.0.0-alpha.6

27 Mar 15:20
cd2cc1b

Choose a tag to compare

This version is probably one of the last alpha before going -rc.

  • [NEW] Add support for @ignore (#6900)
  • [FIX] Gradle plugin: set org.gradle.category attribute and use reverse DNS naming to avoid name clashes (#6886)
  • [FIX] Fix validation of @oneOf input objects. (#6894)
  • [DOWNGRADE] Downgrade compileSdk version to 35 for better compatibility (#6899, #6902)

Many thanks to @eboudrant for the contributions in this release 💙

v4.4.2

16 Mar 19:20
3cc7893

Choose a tag to compare

Maintenance release that adds a new KMP target and makes it easier to work with the new cache and AGP9.

This version also bumps KGP to 2.2. This is transparent for Android/JVM consumers but requires native/JS/wasm consumers to use KGP 2.2 to compile against 4.4.2.

  • [NEW] Add watchosDeviceArm64 (#6892)
  • [UPDATE] Upgrade KGP to 2.2 (#6892)
  • [FIX] If the new cache is present, do not import @typePolicy and @fieldPolicy (#6896)
  • [FIX] Use the same classloader than the one which loaded apollo-gradle-plugin to lookup the AGP version (#6877) (#6893)

New developments happen in the 5.0 alphas.

v5.0.0-alpha.5

25 Feb 10:04
4a43a85

Choose a tag to compare

5.0.0-alpha.5 is "golden-path" ready ✨! It supports the latest GraphQL experimental features:

It also bumps KGP version to 2.3.10. This has no impact for JVM/Android consumers but requires Native/JS/Wasm consumers to compile with Kotlin 2.3.

Many thanks to @abeggsnf for the contributions in this release!

👷‍♂️ All changes

  • [NEW] Add fragment-arguments (#6882)
  • [NEW] Add support for service capabilities (#6858)
  • [NEW] Add support for onError (#6860)
  • [NEW] Implement field extensions (#6856, #6867)
  • [NEW] Use KGP 2.3.10 (#6873)
  • [NEW] Add GraphQLWsProtocol.parseServerMessage() (#6871)
  • [NEW] Rework field merging validation (#6875)
  • [FIX] Data builders: fix nullable fields of composite type (#6855)
  • [FIX] Use the same classloader than the one which loaded apollo-gradle-plugin to lookup the AGP version (#6877)
  • [FIX] Use public AGP API for version detection instead of internal class (#6874)

v4.4.1

30 Jan 16:00
19fa458

Choose a tag to compare

This version has a single fix for a regression in the Gradle plugin:

  • [FIX] Fix ./gradlew download${Service}ApolloSchemaFromIntrospection was crashing due to a bad class relocation (#6863)

v5.0.0-alpha.4

23 Jan 13:10
98b1ec9

Choose a tag to compare

Many thanks @MatthewFolbigg, @scana, and @simonlebras for their contributions to this release!

👷‍♂️ All changes

What's Changed

  • [NEW] Add watchosDeviceArm64 target in #6791
  • [NEW] Add support for directives on directive definitions in #6803
  • [NEW] Add ApolloCall.extensions() in #6834
  • [FIX] Do not compute key fields and key args when the Cache compiler plugin is present in #6797
  • [FIX] Escape /* and */ in KDocs in #6805
  • [FIX] Fix DataBuilders in multi-modules scenarios in #6810
  • [FIX] Data Builders: do not build the FakeResolver multiple times in #6811
  • [FIX] Gradle Plugin: Avoid eager configuration of Gradle objects in #6820
  • [FIX] Rename @link Purpose and Import definitions in #6838
  • [FIX] Escape names in equals(), hashCode(), copy(), and toString() in #6843

4.4.0

21 Jan 11:29
ea0c203

Choose a tag to compare

4.4.0 adds compatibility with AGP9 as well as a few other fixes.

Most of the development is now made in the 5.x alphas.

👷‍♂️ All changes

  • [NEW] AGP9 support (#6844)
  • [NEW] Add @catch support for responseBased codegen (#6698)
  • [NEW] Add ApolloInterceptor.InsertionPoint to control where the interceptors are added (#6767)
  • [FIX] Do not check already checked fragments in checkCapitalizedFields (#6721)
  • [FIX] Restore JsonReader state if a field throws in-flight (#6781)

v5.0.0-alpha.3

13 Nov 17:33
5ce88bc

Choose a tag to compare

@stream support

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

To do this, opt in support for the incremental: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

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

Read more in the migration guide.

Leveraging OkHttp cache

You can now use OkHttp cacheUrlOverride() to cache POST requests.

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

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 existing apollo-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 the migration guide.

AGP9 support

The Gradle plugin now works with AGP 9 and the com.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

v5.0.0-alpha.2

21 Aug 15:31
@BoD BoD
08f33f4

Choose a tag to compare

In this new alpha of v5, here are the main highlights:

  • WasmJs target added to GraphQL subscriptions
  • Experimental generateApolloEnums option to generate enums as a sealed hierarchy distinguishing known and unknown values
  • and a handful of bug fixes and improvements.

Your feedback is greatly appreciated as you try the new version!

To migrate your project, please read the migration guide (work in progress).

👷‍♂️ All changes

  • [new] Add GraphQL subscriptions support for wasmJs target (#6637)
  • [new] Introduce Service.generateApolloEnums to generate enums with a __Known interface (#6611)
  • [new] Add generateApolloProjectIdeModel task (#6666)
  • [new] Introduce Service.pluginsArguments and relax the check for multiple plugins (#6622)
  • [fix] Added default Accept header to introspection query (#6616)
  • [fix] Fix error reporting on invalid documents (#6642)5
  • [fix] [Execution] Fix coercing variable values (#6644)
  • [fix] Normalize the order of arguments of checked definitions (#6650)
  • [fix] Make sure that the introspection endpoint property value is checked at execution time (#6657)
  • [fix] Use the more lenient dependencies API (#6667)
  • [fix] Do not silently discard network exceptions (#6669)
  • [upgrade] Use built-in Node fetch (#6674)

💜 Contributors

Many thanks to @pedromfmachado, @jvanderwee, @aryapreetam and @francescocervone for the contributions and help in this release 💜