QueryObservable returned from client.subscribe seems to assign the immediate query result (from APOLLO_QUERY_RESULT to lastResult and returns an empty object from currentResult immediately following.
This seems to break react-apollo here.
This bug appears to express itself only in areas of our app where we are rendering a list server-side and then clicking a link on that list to navigate to a "more details" view for the list item.
ssr to false for the list view, the bug does not occur. It seems to be some sort of bug with state somewhere in either apollo-client or react-apollo. The bug causes the details view to remain in "loading state" forever because the query result is never passed into the view via @graphql#props callback even when loading becomes false and the query result has been digested into redux.
Query result during breakpoints

QueryObservable#lastResult contains the query result and QueryResult#currentResult() returns an empty object

props callback in @graphql does not contain user


I am seeing the same behaviour: https://gist.github.com/alfonsoperez/2b44155bf5da6834e739e441a212a45e
Will try to create a test case for this.
If you could create a reproduction using react-apollo-error-template it would go a long way in helping us debug this issue! Thank you so much for reporting 馃槉
@calebmer I plan to implement an integration test in react-apollo, which is where this should be moved once we have verified it to be the problem. I just haven't had time yet. Already paired with @helfer on it for a bit last friday. Sorry!
I've been trying to debug this as well. Any updates on a solution or ways we can help out?
ways we can help out
I think we still don't have a reliable reproduction, which would make it much easier to work on a fix.
FWIW, we discovered today that running the graphql HoC twice on a single component with two different queries caused this to happen. By merging both queries together, the bug went away. I've been planning on implementing a test case to reproduce, and will hopefully have time to do so pater this week
Some more debugging... FWIW when a refetchQueries: myQuery is called for an unmounted graphql(myQuery), this bug seems to occur when it is mounted again. Trying to repo in the error template repo...
@derek-duncan @alfonsoperez could either of you find time to try to reproduce this with an integration test in react-apollo? I was planning on doing this like a week ago but I've been so slammed at work that I haven't had time. We should try to get this ironed out before 1.0.
A reliable reproduction with https://github.com/apollographql/react-apollo-error-template would be great! Once we have that, it shouldn't be too hard to pinpoint the issue.
@helfer could I just add you as read-only to our app? I have 3 or 4 examples :D
@helfer I've been working on reproducing in react-apollo-error-template for a bit and having a difficult time pinpointing. I can continue to debug, but @thebigredgeek's repo might be the clearest way for you to see the issue right now.
@thebigredgeek is it easy to run? The main reason we have an error template is because it's relatively easy to run and thus reproduce the error without a lot of unrelated code getting in the way.
@helfer Yeah it's easy to run. You just need docker and direnv. With those, you can pull down prod data spin up then entire project with 3 or 4 commands. PM me on slack?
Or I can just come over again haha
I can try to do it this weekend, but I suspect my issue was related to what @derek-duncan said. Been pretty tough on deadlines too myself :D
This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Apollo Client!