Releases: apollographql/apollo-kotlin
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 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 💜
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 💜
v4.3.2
Maintainance release to fix 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.
- the 5.x Gradle plugins will not be deployed to the Gradle plugin portal and a disclaimer has been added.
- the publishing code has been updated to the new Central Portal API.
What's Changed
- [4.x] Remove IJ plugin by @BoD in #6578
- [4.x] Make tests more robust to version changes by @martinbonnin in #6582
- [4.x] Add a disclaimer to the Gradle Plugin Portal by @martinbonnin in #6584
- [4.x] Added default Accept header to introspection query by @pedromfmachado in #6619
- [4.x] Build: switch publication to the central portal by @martinbonnin in #6629
- [4.x] Also publish 4.x snapshots by @martinbonnin in #6631
- [4.x] Bump nmcp & librarian by @martinbonnin in #6632
- [4.x] Do not deploy kdoc from release-4.x by @martinbonnin in #6633
Full Changelog: v4.3.1...v4.3.2
v5.0.0-alpha.1
Small release to fix a publishing discrepency in the versions. Thanks @ychescale9 for the heads up!
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).
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
Changes
Infrastructure:
- [breaking] Remove ApolloIdlingResource (#6492)
- [breaking] Remove PackageNameGenerator and OperationOutputGenerator, replaced by compiler plugins (#6494)
- [breaking] Move internal testing code to an unpublished module (#6449)
- [breaking] Update deprecations for v5 (#6496)
- [upgrade] Bump ktor to 3.1.2 (#6465)
- [new] Move IJ plugin to its own repository (#6574)
- [new] Switch publication to the central portal (#6581)
Gradle
- [fix] Do not generate the version as const (#6563)
- [new] Switch the gradle plugin to gratatouille (#6524)
- [fix] Remove checkApolloVersion (#6569)
- [new] Introspection: add a hint that more details are available in the exception cause. (#6590)
Compiler:
- [new] Add schema-transform API (#6450)
- [new] Allow to generate Data Builders outside the main source set (#6485)
- [breaking] Using @nonnull is now an error (#6499)
- [fix] Ignore scalars/enums in checkCapitalizedFields (#6502)
- [fix] Call DocumentTransform.transform after adding required fields (#6510)
- [fix] Add key fields to selections even when they're already selected with an alias (#6503)
- [fix] Transform the GraphQL documents before running validation (#6511)
- [new] Add key fields of possible types of interfaces and fragments (#6515)
- [new] Allow to register multiple Apollo Compiler plugins (#6523)
Runtime:
- [new] Add cacheInterceptor() and autoPersistedQueriesInterceptor() (#6455)
- [new] Add
ApolloCall.ignoreUnknownKeys
andApolloClient.Builder.ignoreUnknownKeys
(#6473) - [fix] fix the batch size not respected issue (#6528)
- [fix] Fix losing response headers when using batch request (#6538)
AST:
- [new] Add allowAddingDirectivesToExistingFieldDefinitions (#6470)
- [new] Implement schema coordinates (#6560)
Execution
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
v3.8.6
Maintenance release with a fix for using persisted queries together with subscriptions #6283
Full Changelog: v3.8.5...v3.8.6
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.
This allows to move some cache-specific code generation logic to the new normalized cache repo 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. 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)
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 by using the @map
directive:
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, 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:
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
and the compiler infers the adapter and generates an inline value class automatically:
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.
Support for @disableErrorPropagation
Apollo Kotlin now automatically adds @disableErrorPropagation
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 graphql/graphql-js#4348 and graphql-java/graphql-java#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 throwThrowable
(#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)
v4.1.1
Kotlin 2.1.0 (#6291)
The artifacts are now compiled with Kotlin 2.1.0. This change should be transparent for JVM and Android users thanks to languageVersion
but requires klib consumers (native + JS) to update their KGP version to 2.1.0.
Rover LSP support in the IntelliJ plugin (#6274)
The IntelliJ plugin now has a dedicated mode for backend developers that uses Rover LSP (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 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)