2

Let's say I have 2 pages. User and UserDetail.

User is wrapped by just

user (id: 1){
 id
 name
 email
}

whereas UserDetail is wrapped by more detail query

user (id: 1) {
 id
 name
 email
 bankAccount
 ...
}

I setup dataIdFromObject as typename + id so in this case, both of them use the key of User-1

  1. When I switch from page User to UserDetail, willUser-1 in apollo cache be overwritten to have bankAccount data?
  2. When I switch from UserDetail to User, will bankAccount be removed?
  3. Is it common approach for apollo dataId to be used this way (duplicately) across different pages with different depth of data?

0 Answers0