3.0.0-alpha05 is an incremental update on top of alpha04 with a few important fixes. Many thanks to all the feedback, in particular from @rickclephas, @ProVir, @ychescale9 and @james on the Kotlinlang slack. Thank you 💜!
Relaxed freezing restrictions (#3350)
The Kotlin Native runtime was too strict in ensuring the Continuations were never frozen, which caused exceptions when used with coroutines-native-mt. This check has been removed.
Add ApolloClient.clearNormalizedCache (#3349)
To ease the transition from 2.x, clearNormalizedCache has been added as a deprecated function and will be removed for 3.1
Introduce __Schema to hold the list of all types (#3348)
Because only used types are generated in alpha04, we lost the ability to compute possible types in a typesafe way. This PR re-introduces this with an opt-it generateSchema Gradle property:
apollo {
generateSchema.set(true)
}This will:
- Force generate all composite types (interfaces, objects, unions)
- generate a
__Schemaclass that will hold a list of all composite types
The __Schema class has a possibleTypes() function that can lookup possible types from the list of types:
assertEquals(
setOf(Cat.type, Dog.type, Crocodile.type),
__Schema.possibleTypes(Animal.type).toSet()
)Fix custom scalars in multi module projects (#3341)
For multi-project builds, custom scalar were registered twice, leading to a validation error. This is now fixed.