apollographql / apollo-feature-requests

🧑‍🚀 Apollo Client Feature Requests | (no 🐛 please).
Other
130 stars 7 forks source link

fromLink property in ApolloQueryResult #391

Open lionskape opened 1 year ago

lionskape commented 1 year ago

The Problem: Right now there is no proper way to know if result data was taken from cache or from link.

The Solution: Expose fromLink property introduced in this PR to the ApolloQueryResult.

Why it is a problem? If you are building real user monitoring system - you need to know if the request data was picked from network or from cache to be able to separate them.

jerelmiller commented 1 year ago

Hey @lionskape 👋

This is an interesting request! We are actually looking at providing a whole metrics system sometime within the next couple minor releases that will give you much more detailed insights for the client. This would include metrics such as cache hits/misses, etc. Would something like this fit your use case?