convoyinc / apollo-cache-hermes

A cache implementation for Apollo Client, tuned for performance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support freezeResults?

wmertens opened this issue · comments

I can't find freezeResults (supported by apollo-cache-inmemory) in the repo, and it's been useful to catch dev errors in the past.

Are objects frozen by default, or would this be a useful addition?

Hermes defaults to freezing objects as long as NODE_ENV !== 'production' (this used to be inmemory's original behavior, as well; not sure if it still has the same default).

You can control that via the freeze configuration option

Great 👍