-
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
Avoid view integrations tracking loading state manually #342
Comments
@stubailo Totally agree that 3rd option seems to be the best one.
Yes, it would 👍 |
Oh, awesome! I didn't even notice. I should publish a new version with all of these changes. |
@stubailo Do we stay with
|
@stubailo @kamilkisiela I would love for this to be done! |
This should be fixed through #467 and then we can work on implementing the required changes within the view layers |
Right now, it seems like both
react-apollo
andangular2-apollo
are tracking loading state by doing manual bookkeeping. But this doesn't seem optimal, because:watchQuery
, for examplereturnPartialData
, might return data whileloading
is stilltrue
, confusing the view integrationsI think we should have a way to get the loading state from apollo directly, so that other libraries don't have to guess what it is.
@jbaxleyiii @kamilkisiela do you have some ideas for how it should be best returned? Some ideas:
getLoadingState
methodwatchQuery
has agetLoadingState
methodGraphQLResult
withdata
anderrors
, can get a new property,loading
I think (3) is the best, would doing that be enough to remove the need to keep track of loading state in
react-apollo
andangular2-apollo
?The text was updated successfully, but these errors were encountered: