I need to remove a "record" from the local store by id without using mutation because the server does not support mutations.
I have tried to access manually the store like that:
delete this.apolloClient.store.getState().apollo.data['1112']
this removes the record but when I ask apollo to fetch the items it goes to the server, like there is no cache.
by the way, if instead of removing I just update one of the primitive properties like that :
this.apolloClient.store.getState().apollo.data['1112'].name = 'XXX'
then everything is OK, the data is updated and apollo keep using the cache
I understand that I am supposed to use mutations but I can not.
I need to update only localy
I have found 2 solutions:
for a query of:
**if you know the exact variables: **
if you want to remove everywhere