Open naddeoa opened 5 years ago
You can add appollo engine to your app and you will get all details about each resolvers timing in general and specific. Based on that information you can make decisions if batching would make sence etc etc.
Also when you turn on tracing you will get this data and push it to your own services, its not advised to do it on your production app since it will deliver more data to the client. Hope this helps.
I've written my own link to try and log the total request time for each query. This is roughly the code below. I've also tried apollo-link-logger with the same results.
The numbers that I get seem to account for a lot more than the raw request time though. I'm seeing differences on the order of seconds (for large queries) between what the Android profiler gives me for network requests and what this code gives me. As a test, I added a timer directly to the http link code and those numbers are much closer to the actual network request time.
It would be great if we could actually get at those numbers somehow. Without those, we don't know how long our requests take separate from all of the work that apollo is doing under the hood it seems and I couldn't find anything online about logging request times any differently. Apologies in advance if I missed something.