angular-redux / store

Angular 2+ bindings for Redux
MIT License
1.34k stars 202 forks source link

No longer work correctly with apolloQG #445

Open gotenxds opened 7 years ago

gotenxds commented 7 years ago

This is a...

What toolchain are you using for transpilation/bundling?

Environment

NodeJS Version: 7.10 Typescript Version:latest Angular Version:latest @angular-redux/store version:latest @angular/cli version: (if applicable) OS: Windows 7

Hi, I'm following the guide here and the repo here

This does not seem to work anymore in the newest version of apollo angular and angular-redux for 2 reasons:

  1. (Looks like a angular-redux error) The reduxRootSelector of apollo need to be set to this state => state.computedStates[0].store.apollo. The getState method of angular-redux now returns this weird non state object. ^^

2.(Looks like an angular-apollo error) After successfully running angular-apollo with angular-redux querys no longer seem to work. calling watchQuery does indeed fetch the data, you can see the request being sent and the data returns in the network tab of the dev tools, but the observable is never notified, after debugging unfemilier ugly compiled js code for about 1 and half hours I think the section of the querymanager that checks if the new state and the old state are different does not compare the new state but instead compares the old and the old state with each other instead.

I've also opned an issue with angular-apollo as this seems to be an issue(s) on both parties.

e-schultz commented 7 years ago

Hi,

Do you have a copy of the repo up that is running? In the process of trying to get the example one linked working - but running into issues with various packages being out of date / etc. But if you have a repo up that demonstrates this issue, could save me time looking into this issue.

gotenxds commented 7 years ago

@e-schultz unfortunately my work place is in a closed network... so I cant get anything out. If you cant replicate it, I'l try and make something but it will take me a couple of days.