chatty
chatty copied to clipboard
Encountered a sub-selection on the query, but the store doesn't have \ an object reference
When I use a registered account, this problem occurs, how can I solve it?
Looks like it requires updating some of the apollo related dependencies -- see https://github.com/apollographql/apollo-client/issues/4125
I'll try and take a look when I have a moment.
PS -- you're running this on Android?! Aside from this error, curious how it's working as I haven't had a chance to really try it out
Circling back here, I did a fresh install and this didn't seem to be an issue (WOMM 🤦♂️)
apollo-cache-redux
v0.1.0 with apollo-cache
v1.1.12 seems to work, but that means we're locking old versions in place, which isn't great.
There's currently an unmerged PR for apollo-cache-redux
that should fix the issue with apollo-cache
and apollo-cache-inmemory
at their latest versions -- https://github.com/rportugal/apollo-cache-redux/pull/30
You can either:
- pin your versions
- point npm to the forked git repo (
yarn add apollo-cache-redux@lithodomosvr/apollo-cache-redux#e0eed5237b718673adbeccf7f2ac5f7f2b24e8c0
) - use
apollo-cache-inmemory
instead ofapollo-cache-redux
in chatty
import { InMemoryCache } from 'apollo-cache-inmemory';
...
// const cache = new ReduxCache({ store });
const cache = new InMemoryCache();
However, you won't be able to see the Apollo cache in Redux, which make developing much more difficult 😞, which is why I don't want to replace it in the tut.
I'll update the tutorial when things are more stable.
Let me know if that helps!
I have met seem error, after yarn add apollo-cache-redux@lithodomosvr/apollo-cache-redux#e0eed5237b718673adbeccf7f2ac5f7f2b24e8c0
not the error anymore.
Yes it fetches it into the redux but there is no user in the props?