chatty icon indicating copy to clipboard operation
chatty copied to clipboard

Encountered a sub-selection on the query, but the store doesn't have \ an object reference

Open Warlock1994 opened this issue 6 years ago • 4 comments

When I use a registered account, this problem occurs, how can I solve it? wechat745bd8ba4e20bdcad8864ca5816496ef

Warlock1994 avatar Dec 15 '18 12:12 Warlock1994

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

srtucker22 avatar Jan 03 '19 21:01 srtucker22

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:

  1. pin your versions
  2. point npm to the forked git repo (yarn add apollo-cache-redux@lithodomosvr/apollo-cache-redux#e0eed5237b718673adbeccf7f2ac5f7f2b24e8c0)
  3. use apollo-cache-inmemory instead of apollo-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!

srtucker22 avatar Jan 11 '19 23:01 srtucker22

I have met seem error, after yarn add apollo-cache-redux@lithodomosvr/apollo-cache-redux#e0eed5237b718673adbeccf7f2ac5f7f2b24e8c0

not the error anymore.

suijunqiang avatar Jan 12 '19 09:01 suijunqiang

Yes it fetches it into the redux but there is no user in the props?

Screenshot_6

nemanjam avatar Sep 07 '19 15:09 nemanjam