relay-tools / relay-hooks

Use Relay as React hooks
https://relay-tools.github.io/relay-hooks/docs/relay-hooks.html
MIT License
542 stars 56 forks source link

Getting cache status of query responses #245

Closed prasannaVijay closed 1 year ago

prasannaVijay commented 1 year ago

Looking for a way to understand caching status of responses. When a request is made with 'useQueryand we get a response with data, what is the recommended way to infer where the data came from - was it fully or partially from cache or was a request made over the network? Right now, I am using the values ofisLoadinganddata` in conjunction to make an assumption but would like to know if there are cleaner/more accurate ways to get this information.

morrys commented 1 year ago

look this: https://github.com/relay-tools/relay-hooks/pull/193#issue-1004157902