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
- When I switch from page User to UserDetail, will
User-1in apollo cache be overwritten to havebankAccountdata? - When I switch from UserDetail to User, will
bankAccountbe removed? - Is it common approach for apollo dataId to be used this way (duplicately) across different pages with different depth of data?