What was done I have done a quick investigation and played with refetchQueries for offline change. Users can specify queries as strings and actual queries. We can save them inside an offline queue and then pass it for offline restore handler. Done quick POC to play with this option. Results Offline restore handler executes operations at the application startup. Refetching multiple queries at that time may lead to application slowdown and getting data that may not be needed/visible at this point Using refetchQueries is not recommended by Apollo as it leads to query inefficiency - Refetch queries option will be executing network request to get data that we already have (as it came from mutation). This brought me to the point that we should not support refetchQueries for offline support unless we will have actual community request for that. Having cache helper for update method will be actually a way better and more performant option for users that will be able to simulate refetchQueries functionality without network request to server. |