Previously, we would store the observables and the unsubscribeFn as a
property in the returned data from the GraphQL. This meant users could
not use freezeResults: true option from InMemoryCache as we would
mutate the result.
Now we have migrated to store both, the observable and the unsubscribeFn
in a weak map.
The functions getObservable and unsubscribe should just work as
before.
Previously, we would store the observables and the unsubscribeFn as a property in the returned data from the GraphQL. This meant users could not use
freezeResults: true
option fromInMemoryCache
as we would mutate the result.Now we have migrated to store both, the observable and the unsubscribeFn in a weak map.
The functions
getObservable
andunsubscribe
should just work as before.Fixes #332.
cc/ @charlesdemers.