- Avoid layout effect warning on the server side (@mufasa71 in #35)
- The library now supports the new
@apollo/client@3
. Older versions are no longer supported. - Remove UMD build, as Apollo also doesn't support one anymore.
Special thanks to luuksommers and erosval for beta testing this release in their apps.
- Compatibility with React 16.13
- Improved types for
NetworkStatusAction
. - A more reliable integration with the Apollo cache. This fixes #22 and #28.
- The usage of the library has changed from using a provider to configuring a link that needs to be passed to the
ApolloClient
constructor (see README). - Scoping network status handling to a subtree was removed along with the
enableBubbling
option. The network status handling is scoped to the usage of theApolloClient
instance.
- Support for
@apollo/react-*
packages. - Export
NetworkStatus
andOperationError
types for TypeScript users.
- Raised required peer dependency version of
apollo-client
to^2.6.0
. - You need to depend on a React integration from one of the
@apollo/react-*
packages. See upgrade guide.
Special thanks to Matth10, rcohen-unext and MasterKale for beta testing this release in their apps and code review.
Compatible with react-apollo@^2
. See usage instructions.
- Use hooks for reading the network status.
- Simplified API, so you no longer have to setup the link manually.
- TypeScript support.
- The reported network status is now more granular, allowing for more flexible usage.
- You can now scope the reporting of the network status to a subtree instead of being forced to handle all operations globally.
- You can nest the new
<ApolloNetworkStatusProvider />
in order to have multiple boundaries where network status will be reported (with optional bubbling configurable with theenableBubbling
prop).
- Updated peer dependencies. Please make sure you fulfill them.
- The network status can only be read within the
<ApolloProvider />
. - Queries now only reset the new
queryError
property if it was present before (same for mutations). Previously there was only a singleerror
property which was affected by both types of operations. - The opt-out property
context: {useNetworkStatusNotifier: false}
was renamed touseApolloNetworkStatus
. - If you provide a custom reducer, there's now a new signature where you only provide one function which handles action types instead of separate functions. This pattern composes better since you usually have to cover all network events to implement a given feature.
Subscription operations no longer affect the loading property, but they can potentially set the error property (@shurik239 in #9).
Compatible with react-apollo@<=2
. See usage instructions.
Initial stable release.