Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Watched queries #420

Closed
tomitrescak opened this issue Jan 16, 2017 · 1 comment
Closed

Watched queries #420

tomitrescak opened this issue Jan 16, 2017 · 1 comment

Comments

@tomitrescak
Copy link

tomitrescak commented Jan 16, 2017

Hi, thanks for the hard work guys. I have a problem with watches queries and 'updateQueries' and 'reducer' behaviour. It seems that these only work with currently watched queries (which I see in dev tools). The moment I leave page and new queries are executed the watched queries and reducer behaviour is not performed. An example:

  1. I start in page A where I view results of myList query
  2. I change to page B, where I view results of myOther query
  3. On page B I delete an item that belonged to myList and updateQueries and reducer is ignored for myList
  4. Going back to page A, the deleted item is still there cached

The real world scenario which I have is following.

  1. On page A I view a Schedule and a list of scheduled items. I get the list of scheduled items with query items.
  2. On page B I can update or delete a scheduled item query item.
  3. When I delete this item, the items query is not updated through updateQueries as currently the only watched query is item.
@tmeasday
Copy link
Contributor

Hi @tomitrescak, sounds like you are seeing apollographql/apollo-client#1068 -- see also #419

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants