Skip to content

Commit 57fff04

Browse files
authored
Add changelog for 5.0.0-alpha.3 and bump version. (#6790)
* Version is now 5.0.0-alpha.4-SNAPSHOT * Add changelog * wording * update package-lock.json * update wasm lock * Unbreak Gradle tests * update wasm lock * update package-json.lock
1 parent 5ce88bc commit 57fff04

File tree

17 files changed

+273
-81
lines changed

17 files changed

+273
-81
lines changed

CHANGELOG.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,107 @@ Change Log
33

44
# Next version
55

6+
# Version 5.0.0-alpha.3
7+
_2025-11-13_
8+
9+
### `@stream` support
10+
11+
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.
12+
13+
To do this, opt in support for the [incremental:v0.2 protocol](https://specs.apollo.dev/incremental/v0.2/):
14+
15+
```kotlin
16+
val apolloClient = ApolloClient.Builder()
17+
.networkTransport(
18+
HttpNetworkTransport.Builder()
19+
.serverUrl("http://example.com/graphql")
20+
.incrementalDeliveryProtocol(IncrementalDeliveryProtocol.V0_2)
21+
.build()
22+
)
23+
.build()
24+
```
25+
26+
Using `@defer` and `@stream` will stay opt-in until the RFC is merged.
27+
28+
### WebSockets
29+
30+
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.
31+
32+
Read more in the [migration guide](https://www.apollographql.com/docs/kotlin/v5/migration/5.0).
33+
34+
### HTTP cache
35+
36+
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.
37+
38+
To do so, [configure a cache on your OkHttpClient](https://square.github.io/okhttp/features/caching/) and use `enablePostCaching`:
39+
40+
```kotlin
41+
val apolloClient = ApolloClient.Builder()
42+
.networkTransport(
43+
HttpNetworkTransport.Builder()
44+
// Enable POST caching
45+
.httpRequestComposer(DefaultHttpRequestComposer(serverUrl = mockServer.url(), enablePostCaching = true))
46+
.httpEngine(
47+
DefaultHttpEngine {
48+
OkHttpClient.Builder()
49+
.cache(directory = File(application.cacheDir, "http_cache"), maxSize = 10_000_000)
50+
.build()
51+
}
52+
)
53+
.build()
54+
)
55+
.build()
56+
```
57+
58+
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.
59+
60+
Read more in the [migration guide](https://www.apollographql.com/docs/kotlin/v5/migration/5.0).
61+
62+
### AGP9 support
63+
64+
The Gradle plugin now works with AGP 9 and the `com.android.kotlin.multiplatform.library` plugin.
65+
66+
### `Service.issueSeverity()`
67+
68+
You may now control the severity of issues found by the compiler in your Gradle scripts:
69+
70+
```kotlin
71+
service("service") {
72+
packageName.set("com.example")
73+
// Do not fail the build on unused fragments
74+
// Valid values are the names of the subclasses of `com.apollographql.apollo.ast.Issue`
75+
issueSeverity("UnusedFragment", "warn")
76+
}
77+
```
78+
79+
## 👷‍♂️ All changes
80+
81+
* NEW: Promote experimental websockets to stable by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6774
82+
* NEW: Add `@catch` support for responseBased codegen by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6697
83+
* NEW: Support descriptions on variable definitions by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6699
84+
* NEW: Support Android Gradle Plugin 9 (AGP9) by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6703
85+
* NEW: Add `Service.issueSeverity()` by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6731
86+
* NEW: Add HTTP caching using OkHttp cacheUrlOverride by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6739
87+
* NEW: Implement `@defer` and `@stream` as of `incremental/v0.2` by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6331
88+
* NEW: Add `ApolloRequest.Builder.url(String)` by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6758
89+
* NEW: Add a specific issue type for fragment cycles by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6759
90+
* NEW: Add `ApolloInterceptor.InsertionPoint` to control where the interceptors are added by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6761
91+
* NEW: Introduce `RetryStrategy` by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6764
92+
* FIX: Make `Optional.Absent` a `data object` by @JakeWharton in https://github.com/apollographql/apollo-kotlin/pull/6686
93+
* FIX: Use regular `if`/`else` to avoid `Int` boxing by @JakeWharton in https://github.com/apollographql/apollo-kotlin/pull/6688
94+
* FIX: Remove kotlin-node dependency by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6708
95+
* FIX: Do not check already checked fragments in checkCapitalizedFields by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6718
96+
* FIX: Pretty-print operation manifest by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6720
97+
* FIX: Allow empty deprecationReasons by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6729
98+
* FIX: Fix IndexOutOfBoundsException in keyFields validation by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6748
99+
* FIX: Allow multiple success responses in ApolloCall.execute() by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6772
100+
* FIX: Restore JsonReader state if a field throws in-flight by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6775
101+
* 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
102+
* FIX: fix a timeout leak in the default HttpEngine by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6762
103+
* DOCS: add linuxX64 as supported for apollo-runtime by @hrach in https://github.com/apollographql/apollo-kotlin/pull/6689
104+
* DOCS: Update `@defer` documentation by @calvincestari in https://github.com/apollographql/apollo-kotlin/pull/6751
105+
* UPDATE: Bump KGP to 2.2.20 by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6716
106+
6107
# Version 5.0.0-alpha.2
7108
_2025-08-21_
8109

docs/source/advanced/apollo-ast.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Add the `apollo-ast` dependency to your project:
2121
dependencies {
2222
// ...
2323

24-
implementation("com.apollographql.apollo:apollo-ast:5.0.0-alpha.2")
24+
implementation("com.apollographql.apollo:apollo-ast:5.0.0-alpha.3")
2525
}
2626
```
2727

docs/source/advanced/compiler-plugins.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ plugins {
3333

3434
dependencies {
3535
// Add apollo-compiler as a compileOnly dependency
36-
compileOnly("com.apollographql.apollo:apollo-compiler:5.0.0-alpha.2")
36+
compileOnly("com.apollographql.apollo:apollo-compiler:5.0.0-alpha.3")
3737
}
3838
```
3939

docs/source/advanced/no-runtime.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Using the models without apollo-runtime
77
For this, remove the `com.apollographql.apollo:apollo-runtime` dependency and replace it with:
88

99
```kotlin title="build.gradle"
10-
implementation("com.apollographql.apollo:apollo-api:5.0.0-alpha.2")
10+
implementation("com.apollographql.apollo:apollo-api:5.0.0-alpha.3")
1111
```
1212

1313
## Composing an HTTP request body

docs/source/caching/normalized-cache.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Apollo Kotlin's `MemoryCache` is a normalized, in-memory cache for storing objec
7474

7575
```kotlin title="build.gradle[.kts]"
7676
dependencies {
77-
implementation("com.apollographql.apollo:apollo-normalized-cache:5.0.0-alpha.2")
77+
implementation("com.apollographql.apollo:apollo-normalized-cache:5.0.0-alpha.3")
7878
}
7979
```
8080

@@ -110,7 +110,7 @@ To enable SQLite cache support, add the `apollo-normalized-cache-sqlite` depende
110110

111111
```kotlin title="build.gradle.kts"
112112
dependencies {
113-
implementation("com.apollographql.apollo:apollo-normalized-cache-sqlite:5.0.0-alpha.2")
113+
implementation("com.apollographql.apollo:apollo-normalized-cache-sqlite:5.0.0-alpha.3")
114114
}
115115
```
116116

docs/source/index.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ Add the plugin to your `build.gradle.kts`:
4040

4141
```kotlin
4242
plugins {
43-
id("com.apollographql.apollo") version "5.0.0-alpha.2"
43+
id("com.apollographql.apollo") version "5.0.0-alpha.3"
4444
}
4545
```
4646

4747
Add the runtime dependency:
4848

4949
```kotlin
5050
dependencies {
51-
implementation("com.apollographql.apollo:apollo-runtime:5.0.0-alpha.2")
51+
implementation("com.apollographql.apollo:apollo-runtime:5.0.0-alpha.3")
5252
}
5353
```
5454

@@ -165,29 +165,29 @@ Installation instructions and more information can be found [here](/kotlin/testi
165165

166166
## Releases
167167

168-
The latest version is `5.0.0-alpha.2`.
168+
The latest version is `5.0.0-alpha.3`.
169169

170170
Check the [changelog](https://github.com/apollographql/apollo-kotlin/releases) for the release history.
171171

172172
Releases are hosted on [Maven Central](https://repo1.maven.org/maven2/com/apollographql/apollo/). The plugin is additionally hosted on the [Gradle Plugin Portal](https://plugins.gradle.org/plugin/com.apollographql.apollo)
173173

174174
```kotlin
175175
plugins {
176-
id("com.apollographql.apollo") version "5.0.0-alpha.2"
176+
id("com.apollographql.apollo") version "5.0.0-alpha.3"
177177
}
178178

179179
repositories {
180180
mavenCentral()
181181
}
182182

183183
dependencies {
184-
implementation("com.apollographql.apollo:apollo-runtime:5.0.0-alpha.2")
184+
implementation("com.apollographql.apollo:apollo-runtime:5.0.0-alpha.3")
185185

186186
// Optional: if you want to use the normalized cache
187-
implementation("com.apollographql.apollo:apollo-normalized-cache-sqlite:5.0.0-alpha.2")
187+
implementation("com.apollographql.apollo:apollo-normalized-cache-sqlite:5.0.0-alpha.3")
188188
// Optional: if you just want the generated models and parsers and write your own HTTP code/cache code, you can remove apollo-runtime
189189
// and use apollo-api instead
190-
implementation("com.apollographql.apollo:apollo-api:5.0.0-alpha.2")
190+
implementation("com.apollographql.apollo:apollo-api:5.0.0-alpha.3")
191191
}
192192
```
193193

docs/source/migration/5.0.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ val apolloClient = ApolloClient.Builder()
256256
.httpEngine(
257257
DefaultHttpEngine {
258258
OkHttpClient.Builder()
259-
// Make sure to use a different directory for your cache
260-
.cache(directory = "http_cache2", maxSize = 10_000_000)
259+
// Make sure to use a different directory for your cache as the format changed
260+
.cache(directory = File(application.cacheDir, "http_cache2"), maxSize = 10_000_000)
261261
.build()
262262
}
263263
)

docs/source/testing/apollo-debug-server.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies {
1717
// ...
1818

1919
// For security, add the dependency to your debug builds only
20-
debugImplementation("com.apollographql.apollo:apollo-debug-server:5.0.0-alpha.2")
20+
debugImplementation("com.apollographql.apollo:apollo-debug-server:5.0.0-alpha.3")
2121
}
2222
```
2323

docs/source/testing/mocking-graphql-responses.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Add the dependency to your project's `build.gradle` file:
1414

1515
```kotlin title="build.gradle[.kts]"
1616
dependencies {
17-
testImplementation("com.apollographql.apollo:apollo-testing-support:5.0.0-alpha.2")
17+
testImplementation("com.apollographql.apollo:apollo-testing-support:5.0.0-alpha.3")
1818
}
1919
```
2020

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION_NAME=5.0.0-alpha.3-SNAPSHOT
1+
VERSION_NAME=5.0.0-alpha.4-SNAPSHOT
22

33
android.useAndroidX=true
44

@@ -26,4 +26,4 @@ kotlin.internal.collectFUSMetrics=false
2626
ksp.version.check=false
2727

2828
# See https://youtrack.jetbrains.com/issue/KT-81708
29-
kotlin.incremental.native=false
29+
kotlin.incremental.native=false

0 commit comments

Comments
 (0)