I'm having a query that fetches a list with pagination. If I use cache-and-network, apollo first gets the cached list items, then gets the first page. It results in a flashing screen. If I use network-only, it stops, but every time I navigate, I get the first page of the list. I want to use the cached list. With cache-first it works fine.
However, when I'm trying to add a new item to the list, I obviously want to refetch it. Adding a new list item is in a separate component, and the list component is not rendered, and the list query isn't active.
Once the mutation promise resolves, I redirect to the list component, but it seems like refetchQueries runs before that.
I could make the list component be mounted to make the query active, but there must be an easier way to solve this - I mean it should be a common expected behaviour. Otherwise it would require to go with network-only, or implement some sort of state to know if a query should be refetched or not.