apollo-android v2.4.2 Release Notes

Release Date: 2020-11-02 // over 3 years ago
  • 🔖 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] Add packageName 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] fix downloadApolloSchema 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: