Changelog History
Page 3
-
v2.4.5 Changes
November 18, 2020π Version 2.4.5 is a minor release with Gradle plugin improvements for manipulating schemas as well as a few other bugfixes.
convertApolloSchema
You can now convert your schema from Json to SDL and vice-versa:
./gradlew convertApolloSchema --from schema.json --to schema.sdl
pushApolloSchema
π You can now push a schema to your Apollo Studio registry:
./gradlew uploadApolloSchema --key $key --graph $graph --schema schema.sdl
Full Changelog
π± β¨ New
π [Gradle Plugin] add
./gradlew convertApolloSchema --from schema.json --to schema.sdl
(#2757)
π [Gradle plugin] Add pushApolloSchema (#2737)
[Publishing] add version and a few other attributes to the jar Manifest (#2736)
π [Runtime] Introduce custom error class for better error handling (#2751)π π·β Fixes
[Codegen] Fix capitalized field names in input objects (#2746)
-
v2.4.4 Changes
November 11, 2020π Version 2.4.4 is a hotfix release to disable using Kotlin parameters default values to represent GraphQL variables default values (#2741). This is not needed as the server can infer the variable default value from the query document and created a bunch of other issues (#2744 and #2742) in addition to sending uneeded variables alongside the query.
query GetHero($myBool: Boolean = true) { ... }
will now correctly generate
// no variable will be sent alongside the query by default// and the server will read the default value from the GraphQL query documentdata class GetHero(val myBool: Input\<Boolean\> = Input.absent())
β¬οΈ This bug was introduced in version
2.4.2
. If you're using GraphQL queries with variables default values, please upgrade to2.4.4
.0οΈβ£ #2741 also fixes a crash in the handling of
@include
directives using variables default values in a much less invasive way. Many thanks to @DSteve595 for investigating this and pointing to the correct solution.π Changes:
- βͺ [Codegen] Revert default values as Kotlin default parameters and made skipField more robust (#2741)
-
v2.4.3 Changes
November 09, 2020π Version 2.4.3 is a minor version to fix a regression in
./gradlew downloadApolloSchema
introduced in2.4.2
. The task would fail asking for aservice
even ifschema
andendpoint
were correctly passed (See #2728 for more details).
Many thanks to @nicusorflorin for spotting this!π Other included fixes:
π [SDL] better handling of string escapes (#2729)
[KMP] added a 'timeoutMillis' parameter to ApolloHttpNetworkTransport (#2680) -
v2.4.2 Changes
November 02, 2020π Version 2.4.2 is a maintenance release with language improvements and fixes, better SQL cache debug, Websocket management and more.
SDL type extensions
π Type extensions are now supported in SDL schemas. SDL schema can now include extension like below:
extend type Starship { shieldLevel: Float!}
0οΈβ£ Variable default values
0οΈβ£ Apollo Android now supports default values for variables (#2709)
query GetHero( $myBool: Boolean = true, $unit: LengthUnit! = FOOT, $listOfInts: [Int] = [1, 2, 3] ) { ...}
will generate:
data class GetHero( val myBool: Input\<Boolean\> = Input.optional(true), val unit: LengthUnit = LengthUnit.safeValueOf("FOOT"), val listOfInts: Input\<List\<Int?\>\> = Input.optional(listOf(1, 2, 3)) )
β‘οΈ This only works for scalar types and their list/nonnull declinations. Full support for input object will be added later. Follow #2572 for updates
π Better subscription Websocket management
SubscriptionManger.reconnect
is now exposed as public API. It can be called to reconnect a WebSocket if credentials/token needs to be refreshed.Full Changelog
π± β¨ New
[Subscriptions] expose SubscriptionManager.reconnect() (#2706)
0οΈβ£ [Compiler] Add support for default variable values (#2704)
[SQL cache] implement SqlNormalizedCache.dump (#2709)
π [SDL] add support for type extensions (#2666)
π¦ [Multi-modules] AddpackageName
option to override fragments package name (#2669)π π·β Fixes
π [Compiler] fix
@deprecated(reason:"")
directive (#2720)
π [Compiler] fix@deprecated
directive without any deprecation reason (#2692)
π [Gradle plugin] fixdownloadApolloSchema
variants detection (#2712)
π [Compiler] support multiple arguments in directives (#2711)
π [Compiler] Fix merging fields would forget inline fragments in some cases (#2689)
[Multiplatform] set the correct Content-Type on iOS (#2691)
[SDL] allow to have schemas without mutations/subscriptions (#2684)
π [Gradle Plugin] Make CheckDuplicate task cacheable (#2688)
[Java codegen] Do not try to annotate primitive types in List type parameters (#2663)
[Compiler] Fix Missing Referenced Fragments in Root query type (#2647)
[Publishing] fix the license url and a few other dangling urls after the master -> (#2639)π π Documentation
π [Documentation] use the correct "image/jpeg" mimetype. (#2699)
π± β€οΈ External contributors
Many thanks to:
- @tylerbwong for diving deep into root query types fragments and inline fragments
- π @olivierg13 for making the Gradle build cache always better
- π¦ @Laimiux for making multi-module package names more sensible
- @renclav, @MadJonTurck, @DSteve595, @benoitletondor and @NitroG42 for all the detailed feedback and investigations, this helps a ton !
-
v2.4.1 Changes
October 05, 2020π Version 2.4.1 brings a bunch of bug fixes, support for Gradle configuration cache and better Apollo Studio integration.
π§ Gradle configuration cache
π Apollo Android now supports Gradle configuration cache. Configuration cache is still an incubating Gradle feature. If you notice any warning in your builds, please file an issue
Studio integration
π Users of Apollo Studio can now use the built-in
ApolloClientAwarenessInterceptor
to get more insights about their Android clients. Check the related documentation for more details how to do this.π Also, the Gradle plugin can now download schemas from the registry in addition to using introspection. To download a schema from the registry, use the
--graph
argument:./gradlew downloadApolloSchema --graph $APOLLO_GRAPH --key $APOLLO_KEY --schema schema.[json | sdl]
Full Changelog
π± β¨ New
π [Gradle Plugin] add registry download (#2617)
[Runtime] add a client awareness OkHttp interceptor (#2603)
π§ [Gradle Plugin] configuration cache compatibility (#2608)π π·β Fixes
[Compiler] fix line wrapping on long lines with
forEach
lambda. (#2621)
[Compiler] fix cache key for arguments that contain lists (#2592)
π [Gradle Plugin] fix absolute paths in windows (#2615)π± βοΈ Internal
π² [Runtime] Fix some operation log calls (#2599)
π± β€οΈ External contributors
π Many thanks to @SamuelFrankSmith, @BenSchwab, @moshkit, @annieechen for their awesome work on codegen, runtime, documentation and help keep the project in good shape in general!
-
v2.4.0 Changes
September 22, 2020π Version 2.4.0 brings multiple new features and bugfixes. Read below for the most important changes and full changelog
π Experimental Multi-Modules support
π Version 2.4.0 brings Multi-Modules support. With Multi-Modules, you can reuse GraphQL fragments from different Gradle modules for better separation of concerns and improved build speed.
π Configure your parent module to generate Apollo metadata:
// parent/build.gradle.ktsapollo { generateApolloMetadata.set(true) }
And declare your parent module as a dependency of your feature module:
// feature/build.gradle.ktsdependencies { implementation("com.apollographql.apollo:apollo-runtime:xyz") // more regular dependencies// Apollo dependencies apolloMetadata(project(":parent")) // You still need to declare the parent module as a regular dependency implementation(project(":parent")) }
π For more information, read the official documentation
π± β οΈ Multi-Modules is currently experimental and we'd love to hear how it worked (or not worked) for you. We welcome issues/feedback through the Github Issues
SDL schemas improvements
π Version 2.4.0 brings even more fixes and tools to work with SDL schemas. SDL schemas are a more concise and readable way to work with GraphQL schemas. To use them, replace
schema.json
with your SDL schemaschema.sdl
. You can get a SDL schema from your GraphQL Playground if your endpoint has an associated Playground instance. If you don't have a playground instance or another way to download a SDL file, version 2.4.0 can make an introspection query and save it in SDL format. The schema will be saves as Json or SDL depending on the filename extension:./gradlew downloadApolloSchema --endpoint https://your.graphql/endpoint --schema src/main/graphql/com/example/schema.sdl
Coroutines
π If you're using
apollo-coroutines-support
, version 2.4.0 bringsapolloCall.await()
(#2574). It is more concise than the previousapolloCall.toDeferred().await()
and also respects structured concurrency. We strongely encourage to move to.await()
. Many thanks to @R4md4c for adding this!Kotlin 1.4.10
β The Kotlin 1.4.10 ecosystem is moving forward and we bumped a few dependencies (sqldeligh, okio, kotlin-compile-testing, coroutines and obviously kotlin).
π The Gradle plugin is also compiled against Kotlin 1.4.10 despite Gradle forcing Kotlin 1.3.72 at runtime. We compile with
apiVersion = "1.3"
and our tests do not show any issue but please let us know if you see any weird Gradle behaviour.FileUpload
π Version 2.4.0 fixes how files were written in variables (#2566) and allows to subclass
FileUpload
to make it work without aFile
. With Android 11 and scoped storage out of the door, this will allow to upload from a content uri or any other data source. The API was inspired by OkHttpRequestBody
. If you ever used OkHttp before, you shouldn't be disoriented:object upload : FileUpload(mimetype) { override fun contentLength(): Long { TODO("return contentLength here") } override fun fileName(): String? { TODO("return fileName to use in the multipart request here") } override fun writeTo(sink: BufferedSink) { TODO("write the data here") } }
Full Changelog
π± β¨ New
- π Multi-module support (#2514)
- π [Plugin] Allow to download SDL schemas (#2586)
- π [Plugin] Add an option to fail on deprecated usages (#2575)
- [FileUpload] allow to sub class FileUpload (#2569)
- [FileUpload] Allow to encode custom scalar types as null and use it for file uploads (#2566)
- π [Coroutines] Add
ApolloCall.await
with better structured concurrency support. (#2574)
π· π·ββοΈ Fixes
- [RxJava] fix
retry()
(#2587) - [SDL] Fix a scalar definition after a union defintion (#2559)
- [Compiler] fix optional Int properties with an uppercase name (#2543)
- [SQLNormalizedCache] fix watcher not called on initial cache write (#2538)
π± βοΈ Internal
- β‘οΈ Update CI to use
main
instead ofmaster
(#2594) - β‘οΈ Update LICENSE with new organization name (#2584)
- β Add Kotlin as language for the codeblock (#2580)
- β¬οΈ Bump Kotlin to 1.4.10 (#2578)
- β¬οΈ Bump sql delight version to 1.4.3 (#2564)
- Compile Kotlin against stdlib 1.3 (#2555)
- Put the location of the .xcodeproj file for Kotlin Multiplatform Mobile integration in Android Studio (#2554)
- π [Plugin] allow running the plugin on Gradle 5.6 (#2539)
- β¬οΈ Bump kotlin compile testing (#2547)
π± β€οΈ External contributors
π Many thanks to @R4md4c, @dush1729, @jaggs6 for their awesome work on coroutines, documentation and keeping the project in good shape in general!
-
v2.3.1 Changes
August 24, 2020π Kotlin 1.4 release
π This is the Kotlin 1.4 release. It contains native binaries compiled for 1.4 and bumps some dependencies.
π It also fixes
ApolloCall.Builder.useHttpGetMethodForQueries
, thanks a lot to @ubuntudroid for diving into this!π± β¨ New
- π Kotlin 1.4 support (#2510)
π· π·ββοΈ Fixes
- π Fix
RealApolloCall.toBuilder()
not respecting useHttpGetMethodForQueries (#2530)
-
v2.3.0 Changes
August 13, 2020π± β οΈ Auto Persisted Queries changes
β¬οΈ Enabling Auto Persisted Queries with
ApolloClient.Builder.enableAutoPersistedQueries(true)
will now enable mutations as well (#2509). This should cause no problem in the vast majority of cases. Server supporting auto persisted queries usually support auto persisted mutations as well. As a precautionary measure, we nonetheles recommend testing the integration with your server after upgrading.π JS support for generated models
π The generated models and parsers can now target Javascript thanks to @andersio and @omainegra π. Check out the documentation for adding it to your multiplatform project. For runtime support, follow this issue.
OperationOutputGenerator
In addition to
OperationIdGenerator
, you can now generate operation IDs in batch. This is useful if your backend requires a list of operations to whitelist that should be sent all at once.Exemple usage:
// build.gradle.ktsapollo { // ... operationOutputGenerator.set(object : com.apollographql.apollo.compiler.OperationOutputGenerator { // don't forget to bump the version if you change the implementation override val version = "v1"override fun generate(operationDescriptorList: Collection\<OperationDescriptor\>): OperationOutput { return operationDescriptorList.associate { it.source.md5() to it } } }) }
Full Changelog
π± β¨ New
- π [Gradle Plugin] add a way to generate operation ids as batch (#2476)
- π [Multiplatform] JS support in apollo-api (#2467)
- β [SDL] add a basic validation test (#2493)
π· π·ββοΈ Fixes
- π [Runtime] AutoPersistedQueries supported for mutations
- π [Runtime] add missing @deprecated and
toBuilder
for ApolloMutationCall (#2501) - [Kotlin Runtime] do not use Java8 forEach which is not available on some older android versions (#2517)
- π [SqlLite Cache] bump SqlDelight version, fixes compatibility with SqlDelight 1.4.0 (#2508)
- π [Plugin] better error message for multiple schemas (#2488)
- 0οΈβ£ [Compiler] allow
defaultValue="null"
for non-string scalar types (#2490) - [RxJava2] Add is disposed checking to single (#2480)
- [SQL Cache] Fix writeToCacheAsynchronously boolean always false when prepareInterceptorChain() is called (#2484)
π β‘ Performance
- π [apollo-api] Parse Longs only once (#2473)
- π [Performance] bump okio to 2.7.0. See https://publicobject.com/2020/07/26/optimizing-new-byte/ (#2475)
π± βοΈ Internal
- π [apollo-api] prefix Boolean Kotlin properties with
is
for better java interop (#2474)
π± β€οΈ External contributors
Many thanks to @JakeSteam, @nymerias, @s1ee, @andersio, @omainegra and @olivierg13 for their awesome contributions!
-
v2.2.3 Changes
July 24, 2020Highlights
π Normalized cache performance improvements:
π Continuing from version 2.2.2, this version adds even more cache performance improvements. For SqlNormalizedCache, reads are now wrapped in a transaction, which will make things faster, especially on large objects (#2422).
You also have the option to opt-in asynchonous cache writes (#2416):apolloClient.normalizedCache(cacheFactory, cacheKeyResolver, true)
π» Passing
true
forwriteToCacheAsynchronously
will make your UI display faster since it will get the network response without waiting for the cache write to happen.π SDL schema support:
π Apollo Android now supports SDL (Schema Definition Language) for schemas (#2417). SDL is more concise and easier to read than the introspection json. To use it, place your SDL file in
src/main/graphql/$some/$subdirectory/schema.sdl
π± β¨ New
- π [Codegen] Enable SDL schema Apollo Plugin support (#2417)
- π [Performance] Batch normalized sql cache reads (#2422)
- π [Performance] Run ApolloCacheInterceptor store write on dispatcher thread (#2416)
- [Runtime] add
ApolloClient.autoPersistedOperationsInterceptorFactory
(#2420) - π [apollo-normalized-cache] multiplatform support (#2457)
π· π·ββοΈ Fixes
- [Publication] Fix packaging of apollo-normalized-cache (#2465)
- [Compiler] Fix issue with using inline fragment inside another inline fragment (#2462)
- [LruNormalizedCache] Fix a most likely Java -> Kotlin conversion error in the weighteer implementation (#2428)
- [Kotlin Runtime] calling cancel() on the connection closes it too early, keep the (#2426)
- π [Build] unbreak the generation of
com.apollo.compiler.VERSION
(#2424) - [Subscriptions] Allow calls to WebSocketSubscriptionTransport#send when not connected. (#2419)
- π [Compiler] Support empty graphql files (#2418)
- π [Coroutines-support] expose runtime/coroutines dependencies (#2415)
π± βοΈ Internal
- π [Runtime] deprecate the "builder" methods on
ApolloCall
and add them on theBuilder
instead (#2434) - π [Build scripts] make the project compile with jdk13 (#2449)
- [Tooling] π οΈ Add tasks to check if the API is backward compatible (#2408)
- π¨ [Compiler] Refactor package structure for GraphQL and SDL parsers (#2411)
π± β€οΈ External contributors
Many thanks to @BenSchwab, @jeffnyauke, @DSteve595, @Shevatro and @baconz for their awesome contributions!
-
v2.2.2 Changes
July 02, 2020Important
π This release fixes an important performance issue with the multiplatform
sql-normalized-cache-sqlite
introduced in version2.0.0
. If you are using it, updating is strongly recommended. See #2412 for more details.π± β¨New
- [Kotlin Runtime] subscriptions (#2356 and #2388)
- π [Plugin]
./gradlew downloadApolloSchema
now resolves the schema path automatically if not specified (#2380)
π· π·ββοΈFixes
- π [Normalized Cache] Run SqlNormalizedCache merge in transaction (#2412)
- [Kotlin Runtime] make coroutines and OkHttp API dependencies (#2384)
- [Compiler] fix marshaller is nullable (#2404)
- π [Plugin] check versions lazily (#2400)
π± βοΈ Internal