StarWars
GraphQL based Jetpack Compose and SwiftUI Kotlin Multiplatform sample (using StarWars endpoint - https://graphql.org/swapi-graphql). Makes use of Apollo library and in particular it's Kotlin Multiplatform support.
Work In Progress
GraphQL based Jetpack Compose and SwiftUI Kotlin Multiplatform sample (using StarWars endpoint - https://graphql.org/swapi-graphql). Makes use of Apollo library and in particular it's Kotlin Multiplatform support.
Work In Progress
My 2c - using GraphQL directly as the domain model is very productive. Code gen works to make new data available where it needs to be, and avoids writing additional data classes + mapping functions for all these extra cases.
Is there a reason for prefering these data classes?
data class Film(val id: String, val title: String, val director: String)
fun FilmFragment.mapToModel() = Film(id, title, director)
To improve performance on Wear, with potentially patchy network conditions use the Apollo SQLite cache.
Seems worthwhile to enable on Android also.
Avoid using ApolloStore, just query the data.
Minimal PR with character list.
No effort on the UI before seeing if you think it's helpful for this sample. If you don't want a Wear app for this sample as it focuses on GraphQL, then understood. But a GraphQL + KMM example would be good for Wear.