Project that I work on we are currently hand craft...
# apollo-kotlin
s
Project that I work on we are currently hand crafting Data classes in our unit tests to provide GQL responses. I didn't know about this option generateDataBuilder before I explore using that option is there any plan to "officially" support it. Team doesn't like using "experimental" stuff hence the question;
m
There are a bunch of issues with data builders that we need to fix before it can moved out of experimental status, see here: https://github.com/apollographql/apollo-kotlin/issues/6076
There’s a long history there. Initially, we had test builders that were response based and therefore generated exponential code under some conditions.
Then came data builders. Data builders attempt to fix this by mapping to the “schema” space, it’s a tradeoff in that it’s a bit less typesafe but there’s a guarantee that it will not blowup your codegen
@Stylianos Gakis made the point recently that we could alleviate some of that non-type safety by using a strict mode, see https://kotlinlang.slack.com/archives/C01A6KM1SBZ/p1742485715799459?thread_ts=1742479529.065449&cid=C01A6KM1SBZ for more details
👍 1
And the data builders also embark some “fake” logic to generate random values, which, in retrospect, might have been a mistake.
The current train of thought is to keep the data builders and augment them with another API that is looking more like standard resolvers
tldr; probably worth waiting a little bit if you don’t want API changes
s
Thank you so much @mbonnin for detailed response!
m
Sure thing!