-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add observable query current result #709
Conversation
@tmeasday would you like to see this merged+published before or after our refactor? |
Ideally before I think. Let me hassle @jbaxleyiii again, as he was going to look at this stuff |
Good to go then @helfer |
Also added a test to ensure that we are loading during refetches
(If the results are in the store and `returnPartialData` is used)
And returns the correct "loading" indicator in all cases. The primary aim here is to return results synchronously, even if the query fetch hasn't executed yet. So `currentResult` needs to figure out if a network fetch will be necessary.
420d14c
to
2f2bb33
Compare
@helfer - rebased against I actually ended up undoing part of this commit: https://github.com/apollostack/apollo-client/pull//commits/d852946123ccf2c6f5496a60924a67d89a5954c5 My rationale is that The state of the query should be irrelevant to the results of the query. It's only the options etc of the query that determine the results. (The state drives I'm not sure if we should remove the rest of the above commit too? Do we use Obviously the tests from that #696 are super helpful to have, and still pass in this branch! cc @rricard |
@tmeasday yeah, I think we'll remove the |
This PR is rebased from #635.It also should not be merged until we've confirmed with RA.