Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Patch networkStatus along with loading attribute (#2493)
Browse files Browse the repository at this point in the history
* 🆕 Patch networkStatus along with loading attribute

* Changelog update
  • Loading branch information
Steel Brain authored and hwillson committed Oct 24, 2018
1 parent 4f8e07a commit 312df8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change log

## vNext

### Bug Fixes

- Fix `networkStatus` to reflect the loading state correctly for partial
refetching. <br/>
[@steelbrain](https://github.com/steelbrain) in [#2493](https://github.com/apollographql/react-apollo/pull/2493)

## 2.2.4 (October 2, 2018)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion src/Query.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export default class Query<TData = any, TVariables = OperationVariables> extends
// the original `Query` component are expecting certain data values to
// exist, and they're all of a sudden stripped away. To help avoid
// this we'll attempt to refetch the `Query` data.
Object.assign(data, { loading: true });
Object.assign(data, { loading: true, networkStatus: NetworkStatus.loading });
data.refetch();
return data;
}
Expand Down

0 comments on commit 312df8d

Please sign in to comment.