---
name: Apollo Kotlin
slug: apollo-kotlin
type: github
source_url: https://github.com/apollographql/apollo-kotlin
changelog_url: https://github.com/apollographql/apollo-kotlin/blob/HEAD/CHANGELOG.md
organization: Apollo GraphQL
organization_slug: apollo-graphql
total_releases: 100
latest_version: v5.0.0-alpha.7
latest_date: 2026-04-07
last_updated: 2026-04-19
tracking_since: 2020-06-11
canonical: https://releases.sh/apollo-graphql/apollo-kotlin
organization_url: https://releases.sh/apollo-graphql
---

<Release version="v5.0.0-alpha.7" date="April 7, 2026" published="2026-04-07T12:39:01.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v5.0.0-alpha.7">
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**: https://github.com/apollographql/apollo-kotlin/compare/v5.0.0-alpha.6...v5.0.0-alpha.7
</Release>

<Release version="v4.4.3" date="April 7, 2026" published="2026-04-07T09:45:30.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.4.3">
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)
</Release>

<Release version="v5.0.0-alpha.6" date="March 27, 2026" published="2026-03-27T15:20:37.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v5.0.0-alpha.6">
This version is probably one of the last alpha before going `-rc`.

* [NEW] Add support for `@ignore` (https://github.com/apollographql/apollo-kotlin/pull/6900)
* [FIX] Gradle plugin: set `org.gradle.category` attribute and use reverse DNS naming to avoid name clashes (https://github.com/apollographql/apollo-kotlin/pull/6886)
* [FIX] Fix validation of `@oneOf` input objects.  (https://github.com/apollographql/apollo-kotlin/pull/6894)
* [DOWNGRADE] Downgrade `compileSdk` version to 35 for better compatibility (https://github.com/apollographql/apollo-kotlin/pull/6899, https://github.com/apollographql/apollo-kotlin/pull/6902)

Many thanks to @eboudrant for the contributions in this release 💙
</Release>

<Release version="v4.4.2" date="March 16, 2026" published="2026-03-16T19:20:58.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.4.2">
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**.

</Release>

<Release version="v5.0.0-alpha.5" date="February 25, 2026" published="2026-02-25T10:04:26.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v5.0.0-alpha.5">
`5.0.0-alpha.5` is ["golden-path" ready](https://github.com/graphql/graphql-wg/issues/1887) ✨! It supports the latest GraphQL experimental features:
* [Fragment arguments](https://github.com/graphql/graphql-spec/pull/1081)
* [Service capabilities](https://github.com/graphql/graphql-spec/pull/1163)
* [`onError` request parameter](https://github.com/graphql/graphql-spec/pull/1163)
* [Field extensions](https://github.com/graphql/graphql-spec/issues/1162)

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)
</Release>

<Release version="v4.4.1" date="January 30, 2026" published="2026-01-30T16:00:35.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.4.1">
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 (https://github.com/apollographql/apollo-kotlin/issues/6863)

</Release>

<Release version="v5.0.0-alpha.4" date="January 23, 2026" published="2026-01-23T13:10:21.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v5.0.0-alpha.4">
Many thanks @MatthewFolbigg, @scana, and @simonlebras for their contributions to this release! 

## 👷‍♂️ All changes

## What's Changed
* [NEW] Add watchosDeviceArm64 target in https://github.com/apollographql/apollo-kotlin/pull/6791
* [NEW] Add support for directives on directive definitions in https://github.com/apollographql/apollo-kotlin/pull/6803
* [NEW] Add `ApolloCall.extensions()` in https://github.com/apollographql/apollo-kotlin/pull/6834
* [FIX] Do not compute key fields and key args when the Cache compiler plugin is present in https://github.com/apollographql/apollo-kotlin/pull/6797
* [FIX] Escape /* and */ in KDocs in https://github.com/apollographql/apollo-kotlin/pull/6805
* [FIX] Fix DataBuilders in multi-modules scenarios in https://github.com/apollographql/apollo-kotlin/pull/6810
* [FIX] Data Builders: do not build the FakeResolver multiple times in https://github.com/apollographql/apollo-kotlin/pull/6811
* [FIX] Gradle Plugin: Avoid eager configuration of Gradle objects in https://github.com/apollographql/apollo-kotlin/pull/6820
* [FIX] Rename @link `Purpose` and `Import` definitions in https://github.com/apollographql/apollo-kotlin/pull/6838
* [FIX] Escape names in equals(), hashCode(), copy(), and toString() in https://github.com/apollographql/apollo-kotlin/pull/6843
</Release>

<Release version="v4.4.0" date="January 21, 2026" published="2026-01-21T11:29:20.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.4.0">
## 4.4.0

4.4.0 adds compatibility with [AGP9](https://blog.jetbrains.com/kotlin/2026/01/update-your-projects-for-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)

</Release>

<Release version="v5.0.0-alpha.3" date="November 13, 2025" published="2025-11-13T17:33:51.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v5.0.0-alpha.3">
### `@stream` support

You may now use [`@stream`](https://github.com/graphql/graphql-wg/blob/main/rfcs/DeferStream.md#stream) to stream list responses from a compatible server.

To do this, opt in support for the [incremental:v0.2 protocol](https://specs.apollo.dev/incremental/v0.2/):

```kotlin
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](https://github.com/apollographql/apollo-kotlin/issues/5862) are promoted to stable. In particular, the [request url](https://github.com/apollographql/apollo-kotlin/pull/6758) may now be changed in interceptors. This can be used together with [RetryStrategy](https://github.com/apollographql/apollo-kotlin/pull/6764) 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](https://www.apollographql.com/docs/kotlin/v5/migration/5.0).

### Leveraging OkHttp cache

You can now use OkHttp [cacheUrlOverride()](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-request/-builder/cache-url-override.html) to cache POST requests.

To do so, [configure a cache on your OkHttpClient](https://square.github.io/okhttp/features/caching/) and use `enablePostCaching`:

```kotlin
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](https://www.apollographql.com/docs/kotlin/v5/migration/5.0).

### 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:

```kotlin
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

* NEW: Promote experimental websockets to stable by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6774
* NEW: Add `@catch` support for responseBased codegen by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6697
* NEW: Support descriptions on variable definitions by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6699
* NEW: Support Android Gradle Plugin 9 (AGP9) by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6703
* NEW: Add `Service.issueSeverity()` by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6731
* NEW: Add HTTP caching using OkHttp cacheUrlOverride by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6739
* NEW: Implement `@defer` and `@stream` as of `incremental/v0.2` by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6331
* NEW: Add `ApolloRequest.Builder.url(String)` by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6758
* NEW: Add a specific issue type for fragment cycles by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6759
* NEW: Add `ApolloInterceptor.InsertionPoint` to control where the interceptors are added by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6761
* NEW: Introduce `RetryStrategy` by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6764
* FIX: Make `Optional.Absent` a `data object` by @JakeWharton in https://github.com/apollographql/apollo-kotlin/pull/6686
* FIX: Use regular `if`/`else` to avoid `Int` boxing by @JakeWharton in https://github.com/apollographql/apollo-kotlin/pull/6688
* FIX: Remove kotlin-node dependency by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6708
* FIX: Do not check already checked fragments in checkCapitalizedFields by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6718
* FIX: Pretty-print operation manifest by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6720
* FIX: Allow empty deprecationReasons by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6729
* FIX: Fix IndexOutOfBoundsException in keyFields validation by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6748
* FIX: Allow multiple success responses in ApolloCall.execute() by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6772
* FIX: Restore JsonReader state if a field throws in-flight by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6775
* FIX: Exclude auto-imported cache related directives when the Apollo cache plugin is present by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6766
* FIX: fix a timeout leak in the default HttpEngine by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6762
* DOCS: add linuxX64 as supported for apollo-runtime by @hrach in https://github.com/apollographql/apollo-kotlin/pull/6689
* DOCS: Update `@defer` documentation by @calvincestari in https://github.com/apollographql/apollo-kotlin/pull/6751
* UPDATE: Bump KGP to 2.2.20 by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6716

</Release>

<Release version="v5.0.0-alpha.2" date="August 21, 2025" published="2025-08-21T15:31:08.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v5.0.0-alpha.2">
In this new alpha of v5, here are the main highlights:
- WasmJs target added to GraphQL subscriptions
- Experimental [`generateApolloEnums` option](https://github.com/apollographql/apollo-kotlin/issues/6243) 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](https://www.apollographql.com/docs/kotlin/v5/migration/5.0) (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 💜
</Release>

<Release version="v4.3.3" date="August 21, 2025" published="2025-08-21T13:54:28.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.3.3">
This is maintenance release that includes a few fixes.

## 👷‍♂️ All changes

* [fix] Normalize the order of arguments of checked definitions (#6651)
* [fix] Make sure that the introspection endpoint property value is checked at execution time (#6658)
* [fix] Do not silently discard network exceptions (#6671)

## 💜 Contributors

Many thanks to @francescocervone for the Gradle plugin fix 💜
</Release>

<Release version="v4.3.2" date="July 25, 2025" published="2025-07-25T10:11:27.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.3.2">
Maintainance release to [fix](https://github.com/apollographql/apollo-kotlin/pull/6619) the `Accept:` header during introspection. Many thanks @pedromfmachado for diving into this!

This release also contains infrastructure work:
* the IJ plugin is now released separately from a [dedicated repository](https://github.com/apollographql/apollo-intellij-plugin).
* the 5.x Gradle plugins will **not** be deployed to the [Gradle plugin portal](https://plugins.gradle.org/plugin/com.apollographql.apollo) and a disclaimer has been added. 
* the publishing code has been updated to the new [Central Portal API](https://central.sonatype.org/publish/publish-portal-api/).

## What's Changed
* [4.x] Remove IJ plugin by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6578
* [4.x] Make tests more robust to version changes by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6582
* [4.x] Add a disclaimer to the Gradle Plugin Portal by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6584
* [4.x] Added default Accept header to introspection query by @pedromfmachado in https://github.com/apollographql/apollo-kotlin/pull/6619
* [4.x] Build: switch publication to the central portal by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6629
* [4.x] Also publish 4.x snapshots by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6631
* [4.x] Bump nmcp & librarian by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6632
* [4.x] Do not deploy kdoc from release-4.x by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6633


**Full Changelog**: https://github.com/apollographql/apollo-kotlin/compare/v4.3.1...v4.3.2
</Release>

<Release version="v5.0.0-alpha.1" date="June 30, 2025" published="2025-06-30T09:51:34.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v5.0.0-alpha.1">
Small release to fix a publishing discrepency in the versions. Thanks @ychescale9 for the heads up!

* [fix] Fix `can't resolve apollo-gradle-plugin-tasks` ([#6603](https://github.com/apollographql/apollo-kotlin/pull/6603))
* [new] Warn on unused fragments ([#6601](https://github.com/apollographql/apollo-kotlin/pull/6601))

</Release>

<Release version="v5.0.0-alpha.0" date="June 30, 2025" published="2025-06-30T07:20:57.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v5.0.0-alpha.0">
# Version 5.0.0-alpha.0

This is the first alpha release of version 5 

The package name stayed the same. Version 5 is aiming to be binary compatibile with version 4 with a few exceptions (read more in the [migration guide](https://www.apollographql.com/docs/kotlin/v5/migration/5.0)). 

Version 5.0 also includes new GraphQL features (default value coercion, schema coordinates), improves data builders and compiler plugin APIs amongst other things.

## Read more 
* [migration guide draft](https://www.apollographql.com/docs/kotlin/v5/migration/5.0)
* [v5 docs](https://www.apollographql.com/docs/kotlin/v5)


## Changes

**Infrastructure**:

* [breaking] Remove ApolloIdlingResource ([#6492](https://github.com/apollographql/apollo-kotlin/pull/6492))
* [breaking] Remove PackageNameGenerator and OperationOutputGenerator, replaced by compiler plugins ([#6494](https://github.com/apollographql/apollo-kotlin/pull/6494))
* [breaking] Move internal testing code to an unpublished module ([#6449](https://github.com/apollographql/apollo-kotlin/pull/6449))
* [breaking] Update deprecations for v5 ([#6496](https://github.com/apollographql/apollo-kotlin/pull/6496))
* [upgrade] Bump ktor to 3.1.2 ([#6465](https://github.com/apollographql/apollo-kotlin/pull/6465))
* [new] Move IJ plugin to its own repository ([#6574](https://github.com/apollographql/apollo-kotlin/pull/6574))
* [new] Switch publication to the central portal ([#6581](https://github.com/apollographql/apollo-kotlin/pull/6581))

Gradle
* [fix] Do not generate the version as const ([#6563](https://github.com/apollographql/apollo-kotlin/pull/6563))
* [new] Switch the gradle plugin to gratatouille ([#6524](https://github.com/apollographql/apollo-kotlin/pull/6524))
* [fix] Remove checkApolloVersion ([#6569](https://github.com/apollographql/apollo-kotlin/pull/6569))
* [new] Introspection: add a hint that more details are available in the exception cause. ([#6590](https://github.com/apollographql/apollo-kotlin/pull/6590))

**Compiler**:

* [new] Add schema-transform API ([#6450](https://github.com/apollographql/apollo-kotlin/pull/6450))
* [new] Allow to generate Data Builders outside the main source set ([#6485](https://github.com/apollographql/apollo-kotlin/pull/6485))
* [breaking] Using @nonnull is now an error ([#6499](https://github.com/apollographql/apollo-kotlin/pull/6499))
* [fix] Ignore scalars/enums in checkCapitalizedFields ([#6502](https://github.com/apollographql/apollo-kotlin/pull/6502))
* [fix] Call DocumentTransform.transform after adding required fields ([#6510](https://github.com/apollographql/apollo-kotlin/pull/6510))
* [fix] Add key fields to selections even when they're already selected with an alias ([#6503](https://github.com/apollographql/apollo-kotlin/pull/6503))
* [fix] Transform the GraphQL documents before running validation ([#6511](https://github.com/apollographql/apollo-kotlin/pull/6511))
* [new] Add key fields of possible types of interfaces and fragments ([#6515](https://github.com/apollographql/apollo-kotlin/pull/6515))
* [new] Allow to register multiple Apollo Compiler plugins ([#6523](https://github.com/apollographql/apollo-kotlin/pull/6523))

**Runtime**:

* [new] Add cacheInterceptor() and autoPersistedQueriesInterceptor()  ([#6455](https://github.com/apollographql/apollo-kotlin/pull/6455))
* [new] Add `ApolloCall.ignoreUnknownKeys` and `ApolloClient.Builder.ignoreUnknownKeys` ([#6473](https://github.com/apollographql/apollo-kotlin/pull/6473))
* [fix] fix the batch size not respected issue ([#6528](https://github.com/apollographql/apollo-kotlin/pull/6528))
* [fix] Fix losing response headers when using batch request ([#6538](https://github.com/apollographql/apollo-kotlin/pull/6538))

**AST**:
* [new] Add allowAddingDirectivesToExistingFieldDefinitions ([#6470](https://github.com/apollographql/apollo-kotlin/pull/6470))
* [new] Implement schema coordinates ([#6560](https://github.com/apollographql/apollo-kotlin/pull/6560))

**Execution**
* [fix] Implement defaultValues coercion ([#6440](https://github.com/apollographql/apollo-kotlin/pull/6440))
* [new] Add `JsonCoercing` ([#6471](https://github.com/apollographql/apollo-kotlin/pull/6471))
</Release>

<Release version="v4.3.1" date="June 18, 2025" published="2025-06-18T12:46:53.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.3.1">
This is maintenance release that fixes an issue with Gradle task dependencies when using `connectToAndroidSourceSet()`.

This release also introduces an Enhanced Client Awareness feature that adds the version of the library to requests in the `extensions` object. This is useful for server-side analytics and debugging. This is enabled by default, and can be disabled by calling `sendEnhancedClientAwareness(false)` on your `ApolloClient.Builder`.

## 💜 Contributors

Many thanks to @calvincestari for the client awareness contribution 💜

## 👷‍♂️ All changes

* Backport IJ plugin changes from main (#6559)
* simplify task wiring and fix propagating task dependencies when using connectToAndroidSourceSet() (#6564)
* feature: Enhanced Client Awareness (#6567)

</Release>

<Release version="v3.8.6" date="June 12, 2025" published="2025-06-12T14:21:51.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v3.8.6">
Maintenance release with a fix for using persisted queries together with subscriptions #6283

**Full Changelog**: https://github.com/apollographql/apollo-kotlin/compare/v3.8.5...v3.8.6
</Release>

<Release version="v4.3.0" date="June 5, 2025" published="2025-06-05T12:54:49.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.3.0">
## 4.3.0

# Version 4.3.0

Version 4.3.0 allows adding multiple compiler plugins and stabilizes `ApolloCompilerPlugin.beforeCompilationStep()` as the main entry point for compiler plugins. You can read more in the [compiler plugins documentation page](https://www.apollographql.com/docs/kotlin/advanced/compiler-plugins).

This allows to move some cache-specific code generation logic to the [new normalized cache repo](https://github.com/apollographql/apollo-kotlin-normalized-cache) and better separate concerns. 

Moving forward, `ApolloCompilerPlugin.beforeCompilationStep()` and `ApolloCompilerRegistry.registerOperationIdsGenerator()` are considered stable because they play an important part in setting up [persisted queries](https://www.apollographql.com/docs/kotlin/advanced/persisted-queries). Other APIs are considered more advanced and will most likely stay unstable for the foreseeable future. 

## Contributors 💜

Many thanks to @gnehz972 and @mengdd for their fixes about HTTP batching 💜

## 👷‍♂️ All changes

* Fix losing response headers when using batch request (#6538)
* fix the batch size not respected issue (#6528)
* prepare compiler plugins for 4.3 (#6549)
* Allow to register multiple compiler plugins (#6546)
* Add key fields to selections even when they're already selected with an alias (#6503) (#6544)
* Ignore scalars/enums in checkCapitalizedFields (#6502) (#6543)
* Call DocumentTransform.transform after processing (#6510) (#6512)


</Release>

<Release version="v4.2.0" date="April 28, 2025" published="2025-04-28T14:29:21.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.2.0">
## Generate custom scalars as inline classes with `@map` and `@mapTo` (#6404)

It is now possible to configure the adapters to use with [scalars](https://www.apollographql.com/docs/kotlin/essentials/custom-scalars) by using the [`@map` directive](https://specs.apollo.dev/kotlin_labs/v0.5/#@map):

```graphql
extend schema @link(url: "https://specs.apollo.dev/kotlin_labs/v0.5/", import: ["@mapTo", "@map"])

extend scalar Date @map(to: "kotlinx.datetime.Instant", with: "com.apollographql.adapters.InstantAdapter")
```

If the `to` parameter is an [inline value class](https://kotlinlang.org/docs/inline-classes.html), use the `inlineProperty` parameter to have the generated code box/unbox the value. In that case, `with` needs to point to an adapter of the underlying type:

```graphql
extend scalar Timestamp @map(to: "com.example.Timestamp", with: "com.apollographql.apollo.api.LongAdapter", inlineProperty: "ts")
```

For the common cases where the scalar can be represented as a built-in Kotlin type (String, Boolean, Int, Long, Float, Double), you can use [`@mapTo`](https://specs.apollo.dev/kotlin_labs/v0.5/#@mapTo) and the compiler infers the adapter and generates an inline value class automatically:

```graphql
extend scalar Length @mapTo(builtIn: Long)
```

## Scalar definitions in schemas downloaded from introspection (#6389)

Downloading or converting an SDL schema from introspection now includes scalar definitions.
This is required for clients to get a [full view of the schema](https://github.com/graphql/graphql-wg/blob/main/rfcs/FullSchemas.md).

## Support for `@disableErrorPropagation`

Apollo Kotlin now automatically adds [`@disableErrorPropagation`](https://github.com/graphql/nullability-wg/discussions/85) if your server supports it and you opted in `@catchByDefault` in your schema extensions. This allows to use non-null types more liberally and still get support for partial data.

See https://github.com/graphql/graphql-js/pull/4348 and https://github.com/graphql-java/graphql-java/pull/3772

## Contributors 💜

Many thanks to @bobbysothebys, @jvanderwee, @dhritzkiv, @lwasyl and @rohandhruva for all the contributions and help in this release 💜 

## 👷‍♂️ All changes

* [intellij-plugin] Fix MemoryCache package name (#6383)
* [intellij-plugin] Rover: always pass path to supergraph.yaml if present (#6384)
* [intellij-plugin] Make 'Download Schema action' consider deep subprojects (#6394)
* [intellij-plugin] Fix a crash when invoking the 'missing `@link`' quickfix (#6402)
* [intellij-plugin] Use configured Gradle JVM when executing tasks (#6425)
* [intellij-plugin] Fix pulling normalized cache for recent AS (#6437)
* [intellij-plugin] Use a coroutines to prevent an IllegalStateException (#6460, #6487)
* [intellij-plugin] Use coroutines in ApolloCodegenService (#6477, #6487)
* [intellij-plugin]Use incubating cache 0.0.8 and show errors in cache viewer (#6439)
* [runtime] Use ephemeral NSURLSessionConfiguration by default (#6376)
* [runtime] Add toString() method to ApolloResponse (#6409)
* [runtime] Better error messages for ApolloClient.Builder() (#6424)
* [runtime] Add Swift interceptor iOS test and allow `HttpInterceptor.intercept()` to throw `Throwable` (#6403)
* [runtime] Add cacheInterceptor() and autoPersistedQueriesInterceptor() (#6456)
* [runtime] Revert behaviour change (#6482)
* [runtime] Introduce `@DataBuilderDsl` (#6484)
* [ast] Simplify semanticEquals (#6388)
* [ast] Remove `withBuiltInDefinitions()` and add flag to dump scalar definitions in SDL (#6389)
* [ast] Refactor schema validation (#6396)
* [ast] Better `@link` handling (#6417)
* [ast] Add support for `@disableErrorPropagation` (#6414)
* [compiler] Add `@map` and `@mapTo` (#6404)
* [compiler] Inline classes, fix using inline classes in input positions (#6427)
* [compiler] Java Codegen: add some `@SuppressWarnings("unchecked")` (#6434)
* [gradle-plugin] Make logLevel property internal to not take it into account when caching (#6399)
* [gradle-plugin] expose regular configurations for multi-module projects (#6408)
* [gradle-plugin] Keep the `@RequiresOptIn` annotation in the Gradle plugin (#6406)
* [gradle-plugin] Remove possible eager task creation (#6442)
* [infra] Track `@ApolloInternal` in public ABI (#6407)
* [infra] Track `@ApolloExperimental` symbols in public API (#6416)
* [infra] Cache: add a 'large list' benchmark (#6432)
* [infra] Remove a bunch of warnings (#6441)
* [all] Bump Kotlin to 2.1.10 (#6370)
* [all] Bump Kotlin to 2.1.20 (#6431)

</Release>

<Release version="v4.1.1" date="January 24, 2025" published="2025-01-24T12:04:42.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.1.1">
## Kotlin 2.1.0 (#6291)

The artifacts are now compiled with [Kotlin 2.1.0](https://kotlinlang.org/docs/whatsnew21.html). This change should be transparent for JVM and Android users thanks to [`languageVersion`](https://kotlinlang.org/docs/compatibility-modes.html) but [requires klib consumers (native + JS) to update their KGP version to 2.1.0](https://github.com/JetBrains/kotlin/blob/8add2e3b98904f34ce5db575e9543cb3d3c9ec0b/compiler/util-klib/KotlinAbiVersionBumpHistory.md?plain=1#L3-L5).

## Rover LSP support in the IntelliJ plugin (#6274)

The IntelliJ plugin now has a dedicated mode for backend developers that uses [Rover](https://github.com/apollographql/rover) LSP ([Language Server Protocol](https://en.wikipedia.org/wiki/Language_Server_Protocol)) to parse federation and connectors directives. This mode is only available when using IntelliJ Ultimate and other IDEs with LSP support. It is recommended for subgraphs authors.

## Gradle isolated projects support (#6351)

This release supports [Gradle isolated projects](https://docs.gradle.org/current/userguide/isolated_projects.html) for shorter configuration times.

## 💙💙 Contributors 💙💙

Many thanks to @jvanderwee, @varahash, @whyoleg, @StylianosGakis and @scana for all the contributions and help in this release !

## 👷‍♂️ All changes

* [all] Do not set the license URL in the POMs (#6247)
* [all] Bump Kotlin to 2.1.0 (#6291)
* [all] Bump atomicfu (#6245)
* [intellij-plugin] Play nice with IDEs without Kotlin/Gradle (#6358)
* [intellij-plugin] Reduce usage of GradleExecutionHelper (#6355)
* [intellij-plugin] Use our own executeOnPooledThread instead of Android Plugin's (#6310)
* [intellij-plugin] Make Java and Kotlin dependencies optional (#6304)
* [intellij-plugin] Pass arguments to rover (#6303)
* [intellij-plugin] Move Rover settings to own section and add note about needing v0.27.0+ (#6278)
* [intellij-plugin] Remove untilBuild (#6279)
* [intellij-plugin] Add support for the Apollo LSP via Rover (#6274)
* [intellij-plugin] Don't reference AdbShellCommandsUtil.executeCommandBlocking that's been removed (#6268)
* [intellij-plugin] Make verifyPlugin fail on certain problems (#6256)
* [intellij-plugin] Do not use internal symbol (#6255)
* [intellij-plugin] Add explicit dependency to com.intellij.modules.json (#6254)
* [gradle-plugin] Add a fail-safe mode to disable 2-step introspection and use minimal introspection query (#6360)
* [gradle-plugin] Isolated Projects support (#6351)
* [gradle-plugin] expose the outgoing variants (#6329)
* [gradle-plugin] Better Gradle error message (#6326)
* [gradle-plugin] Fix classloader caching. Many thanks @scana for catching this (#6309)
* [gradle-plugin] Manage our classloaders manually (#6305)
* [gradle-plugin] Only call `onSchema()` once in multi-module scenrios (#6252)
* [runtime] Copy executionContext inside HttpRequest.newBuilder (#6350)
* [runtime] Apple HttpEngine: lock the handlers map (#6348)
* [runtime] Allow to initialize WebSocketEngine lazily (#6290)
* [runtime] Remove CloseableBackgroundDispatcher and bump coroutines version (#6286)
* [runtime] Override JsonNumber.toString() (#6273)
* [runtime] Implement ApolloWebSocketClosedException on darwin targets and update docs (#6275)
* [ast] Make deprecation.reason non-nullable (#6311)
* [ast] Allow multiple `@link` schema extensions (#6284)
* [normalized-cache] Add ApolloStore.ALL_KEYS to notify all watchers (#6337)
* [http-cache] HTTP cache: do not remove cached entries on transport errors (#6314)
* [execution] Add apollo-execution (#6356)

</Release>

<Release version="v4.1.0" date="November 5, 2024" published="2024-11-05T11:19:23.000Z" url="https://github.com/apollographql/apollo-kotlin/releases/tag/v4.1.0">
### Ktor 3.0.0

Version 4.1.0 updates usages of Ktor from 2.3.11 to 3.0.0:

* If you are using `apollo-runtime-js` or `apollo-debug-server-jvm`, you need to update your app to Ktor 3.0.0+ at the same time as updating to Apollo 4.1.0 (`apollo-debug-server-android` is unaffected).
* If you are using the deprecated `apollo-mockserver` or `apollo-ktor-support` from this repo, you need to update to the [new coordinates](https://www.apollographql.com/docs/kotlin/migration/4.0#moved-artifacts).

All other cases are unaffected. In particular, `apollo-runtime` on Android and iOS uses OkHttp and NsUrlConnection respectively and is not impacted by the Ktor update.

You can read more details in the [pull request](https://github.com/apollographql/apollo-kotlin/pull/6214).

### New media type: `application/graphql-response+json`

`application/graphql-response+json` is a new media type being introduced by the [GraphQL over HTTP draft](https://graphql.github.io/graphql-over-http/draft/). It allows differentiating a valid GraphQL response from an error JSON response that could be transmitted by a cache or proxy in the HTTP chain. 

If your server uses `application/graphql-response+json` and returns non-2xx response, Apollo Kotlin will now parse those responses and expose `data` and `errors` instead of returning an `ApolloHttpException` before.

### K2 support for the IntelliJ plugin

The IntelliJ plugin is now compatible with K2 (#6150)

### Removed `apollo-mockserver` and `apollo-ktor-support`

* `apollo-mockserver` is now at `com.apollographql.mockserver:apollo-mockserver:0.1.0` and developed at https://github.com/apollographql/apollo-kotlin-mockserver
* `apollo-ktor-support` is now at `com.apollographql.ktor:apollo-engine-ktor:0.1.0` and developed at https://github.com/apollographql/apollo-kotlin-ktor-support/

### 👷‍♂️ All changes

* [all] Update kotlinpoet to 2.0.0 (#6215)
* [all] Update to Ktor 3 (#6214)
* [all] Remove `apollo-mockserver` and `apollo-ktor-support` (#6215)
* [all] Remove mockserver as a dependency of apollo-testing-support (#6218)
* [ast] Do not escape slashes in single quoted strings (#6190)
* [runtime] Add support for application/graphql-response+json (#6170)
* [runtime] Do not call experimental webSocket() method re-entrently (#6197)
* [debug server] Remove Ktor dependency from apollo-debug-server JVM (#6224)
* [codegen] Do not add internal to private members (#6213)
* [codegen] Fix name clash in data builder names when two types differ only by their case (#6195)
* [gradle plugin] Allow null in KSP arguments for Apollo Compiler Plugins (#6200)
* [gradle plugin] Do not log the full introspection JSON (#6199)
* [gradle plugin] Deprecate TargetLanguage.KOTLIN_1_5 (#6193)
* [IJ Plugin] Make the cache viewer understand the blob db format (#6187)
* [IJ Plugin] Bump IJ Platform Gradle Plugin to 2.0.1 (#6185)
* [IJ Plugin] Migrate to the K2 compatible Analysis API (#6150)
* [IJ Plugin] Schedule the GraphQL configuration reload early (#6228)
* [IJ Plugin] Rename related generated code when renaming an Operation/Fragment (#6227)
* [IJ Plugin] Only highlight the name of unused operations, rather than the whole operation (#6226)
</Release>

<Pagination page="1" total-pages="5" total-items="100" next="https://releases.sh/apollo-graphql/apollo-kotlin.md?page=2" />
