Releases: apollographql/apollo-kotlin
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: v5.0.0-alpha.6...v5.0.0-alpha.7
v4.4.3
v5.0.0-alpha.6
This version is probably one of the last alpha before going -rc.
- [NEW] Add support for
@ignore(#6900) - [FIX] Gradle plugin: set
org.gradle.categoryattribute and use reverse DNS naming to avoid name clashes (#6886) - [FIX] Fix validation of
@oneOfinput objects. (#6894) - [DOWNGRADE] Downgrade
compileSdkversion to 35 for better compatibility (#6899, #6902)
Many thanks to @eboudrant for the contributions in this release 💙
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.
v5.0.0-alpha.5
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
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 #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
PurposeandImportdefinitions in #6838 - [FIX] Escape names in equals(), hashCode(), copy(), and toString() in #6843
4.4.0
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
@catchsupport forresponseBasedcodegen (#6698) - [NEW] Add
ApolloInterceptor.InsertionPointto 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
@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
- NEW: Promote experimental websockets to stable by @martinbonnin in #6774
- NEW: Add
@catchsupport for responseBased codegen by @martinbonnin in #6697 - NEW: Support descriptions on variable definitions by @BoD in #6699
- NEW: Support Android Gradle Plugin 9 (AGP9) by @martinbonnin in #6703
- NEW: Add
Service.issueSeverity()by @martinbonnin in #6731 - NEW: Add HTTP caching using OkHttp cacheUrlOverride by @martinbonnin in #6739
- NEW: Implement
@deferand@streamas ofincremental/v0.2by @BoD in #6331 - NEW: Add
ApolloRequest.Builder.url(String)by @martinbonnin in #6758 - NEW: Add a specific issue type for fragment cycles by @martinbonnin in #6759
- NEW: Add
ApolloInterceptor.InsertionPointto control where the interceptors are added by @martinbonnin in #6761 - NEW: Introduce
RetryStrategyby @martinbonnin in #6764 - FIX: Make
Optional.Absentadata objectby @JakeWharton in #6686 - FIX: Use regular
if/elseto avoidIntboxing by @JakeWharton in #6688 - FIX: Remove kotlin-node dependency by @martinbonnin in #6708
- FIX: Do not check already checked fragments in checkCapitalizedFields by @BoD in #6718
- FIX: Pretty-print operation manifest by @BoD in #6720
- FIX: Allow empty deprecationReasons by @martinbonnin in #6729
- FIX: Fix IndexOutOfBoundsException in keyFields validation by @BoD in #6748
- FIX: Allow multiple success responses in ApolloCall.execute() by @BoD in #6772
- FIX: Restore JsonReader state if a field throws in-flight by @martinbonnin in #6775
- FIX: Exclude auto-imported cache related directives when the Apollo cache plugin is present by @BoD in #6766
- FIX: fix a timeout leak in the default HttpEngine by @martinbonnin in #6762
- DOCS: add linuxX64 as supported for apollo-runtime by @hrach in #6689
- DOCS: Update
@deferdocumentation by @calvincestari in #6751 - UPDATE: Bump KGP to 2.2.20 by @BoD in #6716
v5.0.0-alpha.2
In this new alpha of v5, here are the main highlights:
- WasmJs target added to GraphQL subscriptions
- Experimental
generateApolloEnumsoption 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.generateApolloEnumsto generate enums with a__Knowninterface (#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 💜