Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Warlock1994 opened this issue Dec 15, 2018 · 4 comments

Comments

@Warlock1994
Copy link

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

@srtucker22
Copy link
Owner

Looks like it requires updating some of the apollo related dependencies -- see apollographql/apollo-client#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
Copy link
Owner

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 -- rportugal/apollo-cache-redux#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!

@suijunqiang
Copy link

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

not the error anymore.

@nemanjam
Copy link

nemanjam commented Sep 7, 2019

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

Screenshot_6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants