apollo-link-state-tutorial icon indicating copy to clipboard operation
apollo-link-state-tutorial copied to clipboard

GetCount question

Open cweise opened this issue 6 years ago • 1 comments

Hi Ben, first of all, thank you so much for your YouTube Video about the apollo client cache. I cloned your repo and have a quick question: It seems that the query resolver is only triggered once, which means that the "Queries" component is out of sync after e.g. incrementing. Is this the regular behavior? I attached two screenshots:


Bildschirmfoto 2019-11-27 um 10 30 33
Bildschirmfoto 2019-11-27 um 10 30 47

cweise avatar Nov 27 '19 09:11 cweise

Yes because they are different queries

query SimplePokemon {
        count @client
        pokemon(name: "Pikachu") {
          maxHP
        }
      }

vs

     query GetCount {
        getCount @client
      }

benawad avatar Nov 27 '19 13:11 benawad