You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is the library gives me the following error: TypeError: Cannot define property __mobxDidRunLazyInitializers, object is not extensible
It seems as though const observableQuery = observable(query.currentResult()) is causing the issue. query.currentResult() returns a javascript object which just looks like the following, and will be updated once the data is fetched (although we never get that far)
I'm trying to merge the apollo store with mobx using the following library. https://github.com/sonaye/mobx-apollo
See: https://codesandbox.io/s/2or57135vp
Or simplified version: https://codesandbox.io/s/xv1wxl14xo
It just tries to wrap the apollo store with an observable mobx layer like so:
The problem is the library gives me the following error:
TypeError: Cannot define property __mobxDidRunLazyInitializers, object is not extensible
It seems as though
const observableQuery = observable(query.currentResult())
is causing the issue.query.currentResult()
returns a javascript object which just looks like the following, and will be updated once the data is fetched (although we never get that far)Is there a way to make mobx correctly observe an object or a reference to an object?
The text was updated successfully, but these errors were encountered: