Would it be possible to have Builders generated for each of the generated model classes? E.g. something like AutoValue with Builders or the copy() method for data classes in Kotlin.
The reason I ask is for ease of unit-testing. I'm attempting to test that an Apollo-generated model is mapped correctly to a domain model on a per-field basis rather than all in one go. As far as I can tell this will be difficult to achieve currently without writing a lot of boilerplate (e.g. creating a builder by hand), which undermines the biggest benefit of using Apollo to begin with.
If there are alternative approaches to unit-testing Apollo-model mappers that people have discovered, I'd be very interested to hear them. Cheers
we have such option:
apollo {
generateModelBuilder = true
}
Most helpful comment
we have such option: