Skip to content

Conversation

@manukall
Copy link
Contributor

fixes #65
when the data hasn't changed, nextResult is not called and loading stays true.
this resets loading in the promise returned from refetch.

if (this.observer) {
const result = this.observer.refetch(variables)
const result = this.observer.refetch(variables).then((result) => {
if (result.loading === false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use !result.loading instead of result.loading === false.

@Akryum
Copy link
Member

Akryum commented Jun 26, 2017

Thanks for your PR! 😄 I have left a comment in the changes that you should address before I merge this. 🙌

@manukall
Copy link
Contributor Author

@Akryum done :-)

@Akryum Akryum merged commit 6a28b75 into vuejs:master Jun 30, 2017
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

Successfully merging this pull request may close these issues.

refetching a query breaks loadingKey if no new data is returned

2 participants