Stylianos Gakis
06/02/2022, 1:58 PMStylianos Gakis
06/02/2022, 1:58 PMapolloClient.query(InsuranceQuery...).execute()
skipping some.. then to execute inside HttpNetworkTransport then skipping some more, then this execute from OkHttpEngine (which calls RealCall from OkHttp) returns a body which when doing response.body!!.source().readUtf8()
(consuming it I know, but when I run without the debugger I don’t do that and it still breaks) on it returns a json which is cut off 🤔 it ends with: ..."sections":[]}}],"activeContractBundles
and that’s it, no "
after that, the json ends abruptly. And that activeContractBundles
is one of the two top-lever queries in the insurance query which returns a non-null list of non-null items, but should be able to be empty still.
Important to note that when looking inside CommonQueueMockServerhandler when trying to do handle
and get the response from the queue inside there the whole json string exists intact.
Tried making a smaller object in case idk somehow the body was too long hence doing readUtf8 on it made it be cut off but no matter the length it gets cut the same way.
I don’t even know where to begin trying to understand how this goes bad tbh, if any of this makes any sense to you and you have some pointers I’d love to hear them.
The story behind why I am even doing this is because I want to see what I am doing wrong in how I am constructing the Data object myself from how the test builders do it. So far I’ve done this to see where to put the correct __typenames and it’s worked fine. But this time I am not even sure which part is failing.bod
06/02/2022, 2:08 PMStylianos Gakis
06/02/2022, 2:09 PMStylianos Gakis
06/02/2022, 2:09 PMbod
06/02/2022, 2:09 PMbod
06/02/2022, 3:07 PMStylianos Gakis
06/02/2022, 3:12 PMbod
06/02/2022, 5:42 PMStylianos Gakis
06/02/2022, 6:49 PMStylianos Gakis
06/03/2022, 6:20 AMwasyl
06/03/2022, 6:51 AMhow do you usually tell gradle not to use the one cached locally?I thought Gradle doesn’t cache snapshots by default but apparently it does for 24 hours. Some random advice on APIs used to adjust this: https://stackoverflow.com/a/42058780/1349855 Also you can point Gradle to a specific snapshot: https://medium.com/@vanniktech/pinning-a-snapshot-dependency-to-a-specific-version-b477f79469fc
Stylianos Gakis
06/03/2022, 7:01 AMwasyl
06/03/2022, 7:12 AMStylianos Gakis
06/03/2022, 7:16 AMtestImplementation(libs.apollo.mockServer) {
isChanging = true
}
and
resolutionStrategy.cacheChangingModulesFor(0, "seconds")
on top of that does work now.
Also my test now does in fact run locally with the fix in the latest snapshot. Yay 🥳