morrys / wora

Write Once, Render Anywhere. typescript libraries: cache-persist, apollo-offline, relay-offline, offline-first, apollo-cache, relay-store, netinfo, detect-network
https://morrys.github.io/wora/docs/introduction
MIT License
174 stars 4 forks source link

improved relay-store garbage collector to clear legacy relay entries #53

Closed alexisbronchart closed 4 years ago

alexisbronchart commented 4 years ago

Hi @morrys I made this change to the GC to prevent any issue when upgrading from a previous version of relay as we discussed in https://github.com/morrys/react-relay-offline/issues/38 What do you think?

morrys commented 4 years ago

As written in the comment

it would be more correct to recover the old selector so we can avoid deleting data from the cache without users knowing it.

Its implementation is present in the PR https://github.com/morrys/wora/pull/54