Question.
We are experiment the multi-module feature in our app and it is kinda awesome until now! Loved the feature, it helped us to reduce generated code and to avoid some mistakes.
When we were setting up the multi-module feature we did create an Kotlin module to have the Fragments and Custom Type but when we did integrate the module with a feature module it didn't worked because it seems like this feature doesn't work with Kotlin module. Is this the expected behaviour or it is a planned feature?
It would be good to have the ability to share types and fragment in multiplatform projects.
Thank you in advance!
We have all Apollo generation in a separate Kotlin-only module and it works well. I don't think there's anything tricky about this setup, this is roughly our build.gradle from said module:
plugins {
id("kotlin")
id("com.apollographql.apollo")
}
apollo {
// setCustomTypeMapping...
generateKotlinModels = true
}
repositories {
mavenCentral()
}
dependencies {
api("com.apollographql.apollo:apollo-api:2.5.3")
}
Such module will generate models for all queries under the normal src/main/graphql... path. We can then declare a dependency on this module just like on any other project module in the app. Does this help?
We have all Apollo generation in a separate Kotlin-only module and it works well. I don't think there's anything tricky about this setup, this is roughly our
build.gradlefrom said module:plugins { id("kotlin") id("com.apollographql.apollo") } apollo { // setCustomTypeMapping... generateKotlinModels = true } repositories { mavenCentral() } dependencies { api("com.apollographql.apollo:apollo-api:2.5.3") }Such module will generate models for all queries under the normal
src/main/graphql...path. We can then declare a dependency on this module just like on any other project module in the app. Does this help?
Hi @lwasyl, thank you for your response!
I thought it wasn't supported but you did answer to my question so thanks! I'll take a look into my code to check if it was a missing configuration. Probably I did something wrong 馃槒
I'll close this issue because you solved my question. Thank you again.