diff --git a/.changeset/shiny-balloons-matter.md b/.changeset/shiny-balloons-matter.md
deleted file mode 100644
index 130c69070b8..00000000000
--- a/.changeset/shiny-balloons-matter.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@apollo/client': patch
----
-
-Better handle deferred queries that have cached or partial cached data for them
diff --git a/.changeset/tough-ghosts-itch.md b/.changeset/tough-ghosts-itch.md
deleted file mode 100644
index 59267cab40b..00000000000
--- a/.changeset/tough-ghosts-itch.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-"@apollo/client": patch
----
-
-Fix: unblocks support for defer in mutations
-
-If the `@defer` directive is present in the document passed to `mutate`, the Promise will resolve with the final merged data after the last multipart chunk has arrived in the response.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ecf91b4c2ed..6531357db46 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
# @apollo/client
+## 3.7.3
+
+### Patch Changes
+
+- [#10334](https://github.com/apollographql/apollo-client/pull/10334) [`7d923939d`](https://github.com/apollographql/apollo-client/commit/7d923939dd7e6db7d69f04f598c666104b076e78) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Better handle deferred queries that have cached or partial cached data for them
+
+- [#10368](https://github.com/apollographql/apollo-client/pull/10368) [`46b58e976`](https://github.com/apollographql/apollo-client/commit/46b58e9762abbffaee5c9abda8e309bea6d7a785) Thanks [@alessbell](https://github.com/alessbell)! - Fix: unblocks support for defer in mutations
+
+ If the `@defer` directive is present in the document passed to `mutate`, the Promise will resolve with the final merged data after the last multipart chunk has arrived in the response.
+
## 3.7.2
### Patch Changes
@@ -283,7 +293,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- Fix the type of the `called` property returned by `useQuery()` and `useLazyQuery()`.
[@sztadii](https://github.com/sztadii) in [#9304](https://github.com/apollographql/apollo-client/pull/9304)
-### Bug Fixes (by [@brainkim](https://github.com/brainkim) in [#9328](https://github.com/apollographql/apollo-client/pull/9328))
+### Bug Fixes (by [@brainkim](https://github.com/brainkim) in [#9328](https://github.com/apollographql/apollo-client/pull/9328))
- Fix `refetch()` not being called when `skip` is true.
- Fix the promise returned from the `useLazyQuery()` execution function having stale variables.
@@ -323,16 +333,14 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- [Relevant if you use Apollo Client with React Native] Since Apollo Client v3.5.0, CommonJS bundles provided by `@apollo/client` use a `.cjs` file extension rather than `.cjs.js`, so Node.js won't interpret them as ECMAScript modules. While this change should be an implementation detail, it may cause problems for the [Metro bundler](https://facebook.github.io/metro/) used by React Native, whose [`resolver.sourceExts`](https://facebook.github.io/metro/docs/configuration#sourceexts) configuration does not include the `cjs` extension by default.
As a workaround until [this issue](https://github.com/facebook/metro/issues/535) is resolved, you can configure Metro to understand the `.cjs` file extension by creating a `metro.config.js` file in the root of your React Native project:
+
```js
// NOTE: No longer necessary in @apollo/client@3.6.4!
const { getDefaultConfig } = require("metro-config");
const { resolver: defaultResolver } = getDefaultConfig.getDefaultValues();
exports.resolver = {
...defaultResolver,
- sourceExts: [
- ...defaultResolver.sourceExts,
- "cjs",
- ],
+ sourceExts: [...defaultResolver.sourceExts, "cjs"],
};
```
@@ -373,6 +381,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
[@wassim-k](https://github.com/wassim-k) in [#8382](https://github.com/apollographql/apollo-client/pull/8382)
- Field directives and their arguments can now be included along with field argument names when using [field policy `keyArgs: [...]` notation](https://www.apollographql.com/docs/react/pagination/key-args/). For example, if you have a `Query.feed` field that takes an argument called `type` and uses a `@connection(key:...)` directive to keep `feed` data from different queries separate within the cache, you might configure both using the following `InMemoryCache` field policy:
+
```ts
new InMemoryCache({
typePolicies: {
@@ -384,8 +393,9 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
},
},
},
- })
+ });
```
+
[@benjamn](https://github.com/benjamn) in [#8678](https://github.com/apollographql/apollo-client/pull/8678)
- Report single `MissingFieldError` instead of a potentially very large `MissingFieldError[]` array for incomplete cache reads, improving performance and memory usage.
@@ -421,6 +431,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
### React Refactoring
#### Improvements (due to [@brainkim](https://github.com/brainkim) in [#8875](https://github.com/apollographql/apollo-client/pull/8875)):
+
- The `useLazyQuery` function now returns a promise with the result.
- The `useMutation` result now exposes a method which can be reset.
@@ -721,6 +732,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
To give you more control over this behavior, we have introduced an `overwrite?: boolean = false` option for `cache.writeQuery` and `cache.writeFragment`, and an option called `refetchWritePolicy?: "merge" | "overwrite"` for `client.watchQuery`, `useQuery`, and other functions that accept `WatchQueryOptions`. You can use these options to make sure any `merge` functions involved in cache writes for `refetch` operations get invoked with `undefined` as their first argument, which simulates the absence of any existing data, while still giving the `merge` function a chance to determine the internal representation of the incoming data.
The default behaviors are `overwrite: true` and `refetchWritePolicy: "overwrite"`, which restores the Apollo Client 2.x behavior, but (if this change causes any problems for your application) you can easily recover the previous merging behavior by setting a default value for `refetchWritePolicy` in `defaultOptions.watchQuery`:
+
```ts
new ApolloClient({
defaultOptions: {
@@ -728,8 +740,9 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
refetchWritePolicy: "merge",
},
},
- })
+ });
```
+
[@benjamn](https://github.com/benjamn) in [#7810](https://github.com/apollographql/apollo-client/pull/7810)
- Make sure the `MockedResponse` `ResultFunction` type is re-exported.
@@ -1015,6 +1028,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- Ensure `cache.readQuery` and `cache.readFragment` always return `TData | null`, instead of throwing `MissingFieldError` exceptions when missing fields are encountered.
[@benjamn](https://github.com/benjamn) in [#7098](https://github.com/apollographql/apollo-client/pull/7098)
+
> Since this change converts prior exceptions to `null` returns, and since `null` was already a possible return value according to the `TData | null` return type, we are confident this change will be backwards compatible (as long as `null` was properly handled before).
- `HttpLink` will now automatically strip any unused `variables` before sending queries to the GraphQL server, since those queries are very likely to fail validation, according to the [All Variables Used](https://spec.graphql.org/draft/#sec-All-Variables-Used) rule in the GraphQL specification. If you depend on the preservation of unused variables, you can restore the previous behavior by passing `includeUnusedVariables: true` to the `HttpLink` constructor (which is typically passed as `options.link` to the `ApolloClient` constructor).
@@ -1022,6 +1036,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- Ensure `MockLink` (used by `MockedProvider`) returns mock configuration errors (e.g. `No more mocked responses for the query ...`) through the Link's `Observable`, instead of throwing them. These errors are now available through the `error` property of a result.
[@hwillson](https://github.com/hwillson) in [#7110](https://github.com/apollographql/apollo-client/pull/7110)
+
> Returning mock configuration errors through the Link's `Observable` was the default behavior in Apollo Client 2.x. We changed it for 3, but the change has been problematic for those looking to migrate from 2.x to 3. We've decided to change this back with the understanding that not many people want or are relying on `MockLink`'s throwing exception approach. If you want to change this functionality, you can define custom error handling through `MockLink.setOnError`.
- Unsubscribing the last observer from an `ObservableQuery` will once again unsubscribe from the underlying network `Observable` in all cases, as in Apollo Client 2.x, allowing network requests to be cancelled by unsubscribing.
@@ -1032,11 +1047,11 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- Internally, Apollo Client now avoids nested imports from the `graphql` package, importing everything from the top-level package instead. For example,
```ts
- import { visit } from "graphql/language/visitor"
+ import { visit } from "graphql/language/visitor";
```
is now just
```ts
- import { visit } from "graphql"
+ import { visit } from "graphql";
```
Since the `graphql` package uses `.mjs` modules, your bundler may need to be configured to recognize `.mjs` files as ECMAScript modules rather than CommonJS modules.
[@benjamn](https://github.com/benjamn) in [#7185](https://github.com/apollographql/apollo-client/pull/7185)
@@ -1050,6 +1065,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
[@benjamn](https://github.com/benjamn) in [#7070](https://github.com/apollographql/apollo-client/pull/7070)
- The verbosity of Apollo Client console messages can be globally adjusted using the `setLogVerbosity` function:
+
```ts
import { setLogVerbosity } from "@apollo/client";
setLogVerbosity("log"); // display all messages
@@ -1057,6 +1073,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
setLogVerbosity("error"); // display only errors
setLogVerbosity("silent"); // hide all console messages
```
+
Remember that all logs, warnings, and errors are hidden in production.
[@benjamn](https://github.com/benjamn) in [#7226](https://github.com/apollographql/apollo-client/pull/7226)
@@ -1171,7 +1188,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- Fix `relayStylePagination` to handle the possibility that edges might be normalized `Reference` objects (uncommon).
[@anark](https://github.com/anark) and [@benjamn](https://github.com/benjamn) in [#7023](https://github.com/apollographql/apollo-client/pull/7023)
-- Disable "Missing cache result fields" warnings when `returnPartialData` is `true`.
+- Disable "Missing cache result fields" warnings when `returnPartialData` is `true`.
[@hwillson](https://github.com/hwillson) in [#7055](https://github.com/apollographql/apollo-client/pull/7055)
### Improvements
@@ -1267,7 +1284,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
### Bug Fixes
-- Avoid making network requests when `skip` is `true`.
+- Avoid making network requests when `skip` is `true`.
[@hwillson](https://github.com/hwillson) in [#6752](https://github.com/apollographql/apollo-client/pull/6752)
### Improvements
@@ -1359,7 +1376,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- **[BREAKING]** Support for the `@live` directive has been removed, but might be restored in the future if a more thorough implementation is proposed.
[@benjamn](https://github.com/benjamn) in [#6221](https://github.com/apollographql/apollo-client/pull/6221)
-- **[BREAKING]** Apollo Client 2.x allowed `@client` fields to be passed into the `link` chain if `resolvers` were not set in the constructor. This allowed `@client` fields to be passed into Links like `apollo-link-state`. Apollo Client 3 enforces that `@client` fields are local only, meaning they are no longer passed into the `link` chain, under any circumstances.
+- **[BREAKING]** Apollo Client 2.x allowed `@client` fields to be passed into the `link` chain if `resolvers` were not set in the constructor. This allowed `@client` fields to be passed into Links like `apollo-link-state`. Apollo Client 3 enforces that `@client` fields are local only, meaning they are no longer passed into the `link` chain, under any circumstances.
[@hwillson](https://github.com/hwillson) in [#5982](https://github.com/apollographql/apollo-client/pull/5982)
- **[BREAKING?]** Refactor `QueryManager` to make better use of observables and enforce `fetchPolicy` more reliably.
@@ -1371,7 +1388,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- Helper functions for generating common pagination-related field policies may be imported from `@apollo/client/utilities`. The most basic helper is `concatPagination`, which emulates the concatenation behavior of typical `updateQuery` functions. A more sophisticated helper is `offsetLimitPagination`, which implements offset/limit-based pagination. If you are consuming paginated data from a Relay-friendly API, use `relayStylePagination`. Feel free to use [these helper functions](https://github.com/apollographql/apollo-client/blob/main/src/utilities/policies/pagination.ts) as inspiration for your own field policies, and/or modify them to suit your needs.
[@benjamn](https://github.com/benjamn) in [#6465](https://github.com/apollographql/apollo-client/pull/6465)
-- Updated to work with `graphql@15`.
+- Updated to work with `graphql@15`.
[@durchanek](https://github.com/durchanek) in [#6194](https://github.com/apollographql/apollo-client/pull/6194) and [#6279](https://github.com/apollographql/apollo-client/pull/6279)
[@hagmic](https://github.com/hagmic) in [#6328](https://github.com/apollographql/apollo-client/pull/6328)
@@ -1381,21 +1398,22 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- The `gql` template tag should now be imported from the `@apollo/client` package, rather than the `graphql-tag` package. Although the `graphql-tag` package still works for now, future versions of `@apollo/client` may change the implementation details of `gql` without a major version bump.
[@hwillson](https://github.com/hwillson) in [#5451](https://github.com/apollographql/apollo-client/pull/5451)
-- `@apollo/client/core` can be used to import the Apollo Client core, which includes everything the main `@apollo/client` package does, except for all React related functionality.
+- `@apollo/client/core` can be used to import the Apollo Client core, which includes everything the main `@apollo/client` package does, except for all React related functionality.
[@kamilkisiela](https://github.com/kamilkisiela) in [#5541](https://github.com/apollographql/apollo-client/pull/5541)
- Several deprecated methods have been fully removed:
+
- `ApolloClient#initQueryManager`
- `QueryManager#startQuery`
- `ObservableQuery#currentResult`
-- Apollo Client now supports setting a new `ApolloLink` (or link chain) after `new ApolloClient()` has been called, using the `ApolloClient#setLink` method.
+- Apollo Client now supports setting a new `ApolloLink` (or link chain) after `new ApolloClient()` has been called, using the `ApolloClient#setLink` method.
[@hwillson](https://github.com/hwillson) in [#6193](https://github.com/apollographql/apollo-client/pull/6193)
- The final time a mutation `update` function is called, it can no longer accidentally read optimistic data from other concurrent mutations, which ensures the use of optimistic updates has no lasting impact on the state of the cache after mutations have finished.
[@benjamn](https://github.com/benjamn) in [#6551](https://github.com/apollographql/apollo-client/pull/6551)
-- Apollo links that were previously maintained in https://github.com/apollographql/apollo-link have been merged into the Apollo Client project. They should be accessed using the new entry points listed in the [migration guide](./docs/source/migrating/apollo-client-3-migration.md).
+- Apollo links that were previously maintained in https://github.com/apollographql/apollo-link have been merged into the Apollo Client project. They should be accessed using the new entry points listed in the [migration guide](./docs/source/migrating/apollo-client-3-migration.md).
[@hwillson](https://github.com/hwillson) in [#](TODO)
### `InMemoryCache`
@@ -1405,7 +1423,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- The `InMemoryCache` constructor should now be imported directly from `@apollo/client`, rather than from a separate package. The `apollo-cache-inmemory` package is no longer supported.
> The `@apollo/client/cache` entry point can be used to import `InMemoryCache` without importing other parts of the Apollo Client codebase.
- [@hwillson](https://github.com/hwillson) in [#5577](https://github.com/apollographql/apollo-client/pull/5577)
+ > [@hwillson](https://github.com/hwillson) in [#5577](https://github.com/apollographql/apollo-client/pull/5577)
- **[BREAKING]** `FragmentMatcher`, `HeuristicFragmentMatcher`, and `IntrospectionFragmentMatcher` have all been removed. We now recommend using `InMemoryCache`’s `possibleTypes` option instead. For more information see the [Defining `possibleTypes` manually](https://www.apollographql.com/docs/react/v3.0-beta/data/fragments/#defining-possibletypes-manually) section of the docs.
[@benjamn](https://github.com/benjamn) in [#5073](https://github.com/apollographql/apollo-client/pull/5073)
@@ -1422,7 +1440,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- **[BREAKING]** `InMemoryCache` now _throws_ when data with missing or undefined query fields is written into the cache, rather than just warning in development.
[@benjamn](https://github.com/benjamn) in [#6055](https://github.com/apollographql/apollo-client/pull/6055)
-- **[BREAKING]** `client|cache.writeData` have been fully removed. `writeData` usage is one of the easiest ways to turn faulty assumptions about how the cache represents data internally, into cache inconsistency and corruption. `client|cache.writeQuery`, `client|cache.writeFragment`, and/or `cache.modify` can be used to update the cache.
+- **[BREAKING]** `client|cache.writeData` have been fully removed. `writeData` usage is one of the easiest ways to turn faulty assumptions about how the cache represents data internally, into cache inconsistency and corruption. `client|cache.writeQuery`, `client|cache.writeFragment`, and/or `cache.modify` can be used to update the cache.
[@benjamn](https://github.com/benjamn) in [#5923](https://github.com/apollographql/apollo-client/pull/5923)
- `InMemoryCache` now supports tracing garbage collection and eviction. Note that the signature of the `evict` method has been simplified in a potentially backwards-incompatible way.
@@ -1444,29 +1462,35 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
[@benjamn](https://github.com/benjamn) in [#5617](https://github.com/apollographql/apollo-client/pull/5617)
- `InMemoryCache` now has a method called `modify` which can be used to update the value of a specific field within a specific entity object:
+
```ts
cache.modify({
id: cache.identify(post),
fields: {
comments(comments: Reference[], { readField }) {
- return comments.filter(comment => idToRemove !== readField("id", comment));
+ return comments.filter(
+ (comment) => idToRemove !== readField("id", comment)
+ );
},
},
});
```
+
This API gracefully handles cases where multiple field values are associated with a single field name, and also removes the need for updating the cache by reading a query or fragment, modifying the result, and writing the modified result back into the cache. Behind the scenes, the `cache.evict` method is now implemented in terms of `cache.modify`.
[@benjamn](https://github.com/benjamn) in [#5909](https://github.com/apollographql/apollo-client/pull/5909)
and [#6178](https://github.com/apollographql/apollo-client/pull/6178)
- `InMemoryCache` provides a new API for storing client state that can be updated from anywhere:
+
```ts
- import { makeVar } from "@apollo/client"
- const v = makeVar(123)
- console.log(v()) // 123
- console.log(v(v() + 1)) // 124
- console.log(v()) // 124
- v("asdf") // TS type error
+ import { makeVar } from "@apollo/client";
+ const v = makeVar(123);
+ console.log(v()); // 123
+ console.log(v(v() + 1)); // 124
+ console.log(v()); // 124
+ v("asdf"); // TS type error
```
+
These variables are _reactive_ in the sense that updating their values invalidates any previously cached query results that depended on the old values.
[@benjamn](https://github.com/benjamn) in
[#5799](https://github.com/apollographql/apollo-client/pull/5799),
@@ -1497,10 +1521,10 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- Custom field `read` functions can read from neighboring fields using the `readField(fieldName)` helper, and may also read fields from other entities by calling `readField(fieldName, objectOrReference)`.
[@benjamn](https://github.com/benjamn) in [#5651](https://github.com/apollographql/apollo-client/pull/5651)
-- Expose cache `modify` and `identify` to the mutate `update` function.
+- Expose cache `modify` and `identify` to the mutate `update` function.
[@hwillson](https://github.com/hwillson) in [#5956](https://github.com/apollographql/apollo-client/pull/5956)
-- Add a default `gc` implementation to `ApolloCache`.
+- Add a default `gc` implementation to `ApolloCache`.
[@justinwaite](https://github.com/justinwaite) in [#5974](https://github.com/apollographql/apollo-client/pull/5974)
### React
@@ -1514,80 +1538,82 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
[@benjamn](https://github.com/benjamn) in [#5962](https://github.com/apollographql/apollo-client/pull/5962)
- The contents of the `@apollo/react-hooks` package have been merged into `@apollo/client`, enabling the following all-in-one `import`:
+
```ts
- import { ApolloClient, ApolloProvider, useQuery } from '@apollo/client';
+ import { ApolloClient, ApolloProvider, useQuery } from "@apollo/client";
```
+
[@hwillson](https://github.com/hwillson) in [#5357](https://github.com/apollographql/apollo-client/pull/5357)
-- React SSR features (previously accessed via `@apollo/react-ssr`) can now be accessed from the separate Apollo Client entry point of `@apollo/client/react/ssr`. These features are not included in the default `@apollo/client` bundle.
+- React SSR features (previously accessed via `@apollo/react-ssr`) can now be accessed from the separate Apollo Client entry point of `@apollo/client/react/ssr`. These features are not included in the default `@apollo/client` bundle.
[@hwillson](https://github.com/hwillson) in [#6499](https://github.com/apollographql/apollo-client/pull/6499)
### General
-- **[BREAKING]** Removed `graphql-anywhere` since it's no longer used by Apollo Client.
+- **[BREAKING]** Removed `graphql-anywhere` since it's no longer used by Apollo Client.
[@hwillson](https://github.com/hwillson) in [#5159](https://github.com/apollographql/apollo-client/pull/5159)
-- **[BREAKING]** Removed `apollo-boost` since Apollo Client 3.0 provides a boost like getting started experience out of the box.
+- **[BREAKING]** Removed `apollo-boost` since Apollo Client 3.0 provides a boost like getting started experience out of the box.
[@hwillson](https://github.com/hwillson) in [#5217](https://github.com/apollographql/apollo-client/pull/5217)
- **[BREAKING]** We are no longer exporting certain (intended to be) internal utilities. If you are depending on some of the lesser known exports from `apollo-cache`, `apollo-cache-inmemory`, or `apollo-utilities`, they may no longer be available from `@apollo/client`.
[@hwillson](https://github.com/hwillson) in [#5437](https://github.com/apollographql/apollo-client/pull/5437) and [#5514](https://github.com/apollographql/apollo-client/pull/5514)
> Utilities that were previously externally available through the `apollo-utilities` package are now only available by importing from `@apollo/client/utilities`.
- [@hwillson](https://github.com/hwillson) in [#5683](https://github.com/apollographql/apollo-client/pull/5683)
+ > [@hwillson](https://github.com/hwillson) in [#5683](https://github.com/apollographql/apollo-client/pull/5683)
-- Make sure all `graphql-tag` public exports are re-exported.
+- Make sure all `graphql-tag` public exports are re-exported.
[@hwillson](https://github.com/hwillson) in [#5861](https://github.com/apollographql/apollo-client/pull/5861)
-- Fully removed `prettier`. The Apollo Client team has decided to no longer automatically enforce code formatting across the codebase. In most cases existing code styles should be followed as much as possible, but this is not a hard and fast rule.
+- Fully removed `prettier`. The Apollo Client team has decided to no longer automatically enforce code formatting across the codebase. In most cases existing code styles should be followed as much as possible, but this is not a hard and fast rule.
[@hwillson](https://github.com/hwillson) in [#5227](https://github.com/apollographql/apollo-client/pull/5227)
-- Make sure `ApolloContext` plays nicely with IE11 when storing the shared context.
+- Make sure `ApolloContext` plays nicely with IE11 when storing the shared context.
[@ms](https://github.com/ms) in [#5840](https://github.com/apollographql/apollo-client/pull/5840)
-- Migrated React Apollo HOC and Components functionality into Apollo Client, making it accessible from `@apollo/client/react/components` and `@apollo/client/react/hoc` entry points.
+- Migrated React Apollo HOC and Components functionality into Apollo Client, making it accessible from `@apollo/client/react/components` and `@apollo/client/react/hoc` entry points.
[@hwillson](https://github.com/hwillson) in [#6558](https://github.com/apollographql/apollo-client/pull/6558)
-- Support passing a `context` object through the link execution chain when using subscriptions.
+- Support passing a `context` object through the link execution chain when using subscriptions.
[@sgtpepper43](https://github.com/sgtpepper43) in [#4925](https://github.com/apollographql/apollo-client/pull/4925)
-- `MockSubscriptionLink` now supports multiple subscriptions.
+- `MockSubscriptionLink` now supports multiple subscriptions.
[@dfrankland](https://github.com/dfrankland) in [#6081](https://github.com/apollographql/apollo-client/pull/6081)
### Bug Fixes
-- `useMutation` adjustments to help avoid an infinite loop / too many renders issue, caused by unintentionally modifying the `useState` based mutation result directly.
+- `useMutation` adjustments to help avoid an infinite loop / too many renders issue, caused by unintentionally modifying the `useState` based mutation result directly.
[@hwillson](https://github/com/hwillson) in [#5770](https://github.com/apollographql/apollo-client/pull/5770)
- Missing `__typename` fields no longer cause the `InMemoryCache#diff` result to be marked `complete: false`, if those fields were added by `InMemoryCache#transformDocument` (which calls `addTypenameToDocument`).
[@benjamn](https://github.com/benjamn) in [#5787](https://github.com/apollographql/apollo-client/pull/5787)
-- Fixed an issue that allowed `@client @export` based queries to lead to extra unnecessary network requests being fired.
+- Fixed an issue that allowed `@client @export` based queries to lead to extra unnecessary network requests being fired.
[@hwillson](https://github.com/hwillson) in [#5946](https://github.com/apollographql/apollo-client/pull/5946)
-- Refined `useLazyQuery` types to help prevent runtime errors.
+- Refined `useLazyQuery` types to help prevent runtime errors.
[@benmosher](https://github.com/benmosher) in [#5935](https://github.com/apollographql/apollo-client/pull/5935)
-- Make sure `@client @export` variables used in watched queries are updated each time the query receives new data that changes the value of the `@export` variable.
+- Make sure `@client @export` variables used in watched queries are updated each time the query receives new data that changes the value of the `@export` variable.
[@hwillson](https://github.com/hwillson) in [#5986](https://github.com/apollographql/apollo-client/pull/5986)
-- Ensure `useMutation` passes a defined `errorPolicy` option into its underlying `ApolloClient.mutate()` call.
+- Ensure `useMutation` passes a defined `errorPolicy` option into its underlying `ApolloClient.mutate()` call.
[@jamesreggio](https://github.com/jamesreggio) in [#5863](https://github.com/apollographql/apollo-client/pull/5863)
- `useQuery`: Prevent new data re-render attempts during an existing render. This helps avoid React 16.13.0's "Cannot update a component from inside the function body of a different component" warning (https://github.com/facebook/react/pull/17099).
[@hwillson](https://github.com/hwillson) in [#6107](https://github.com/apollographql/apollo-client/pull/6107)
-- Expand `ApolloError` typings to include `ServerError` and `ServerParseError`.
+- Expand `ApolloError` typings to include `ServerError` and `ServerParseError`.
[@dmarkow](https://github.com/dmarkow) in [#6319](https://github.com/apollographql/apollo-client/pull/6319)
-- Fast responses received over the link chain will no longer conflict with `skip` settings.
+- Fast responses received over the link chain will no longer conflict with `skip` settings.
[@hwillson](https://github.com/hwillson) in [#6587](https://github.com/apollographql/apollo-client/pull/6587)
## Apollo Client 2.6.8
### Apollo Client (2.6.8)
-- Update the `fetchMore` type signature to accept `context`.
+- Update the `fetchMore` type signature to accept `context`.
[@koenpunt](https://github.com/koenpunt) in [#5147](https://github.com/apollographql/apollo-client/pull/5147)
- Fix type for `Resolver` and use it in the definition of `Resolvers`.
@@ -1606,12 +1632,12 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
### GraphQL Anywhere (4.2.6)
-- Fix `filter` edge case involving `null`.
+- Fix `filter` edge case involving `null`.
[@lifeiscontent](https://github.com/lifeiscontent) in [#5110](https://github.com/apollographql/apollo-client/pull/5110)
### Apollo Boost (0.4.7)
-- Replace `GlobalFetch` reference with `WindowOrWorkerGlobalScope`.
+- Replace `GlobalFetch` reference with `WindowOrWorkerGlobalScope`.
[@abdonrd](https://github.com/abdonrd) in [#5373](https://github.com/apollographql/apollo-client/pull/5373)
- Add `assumeImmutableResults` typing to apollo boost `PresetConfig` interface.
@@ -1626,11 +1652,11 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
[@jasonpaulos](https://github.com/jasonpaulos) in [#4992](https://github.com/apollographql/apollo-client/pull/4992)
- Add `graphql` as a `peerDependency` of `apollo-cache` and
- `graphql-anywhere`.
+ `graphql-anywhere`.
[@ssalbdivad](https://github.com/ssalbdivad) in [#5081](https://github.com/apollographql/apollo-client/pull/5081)
-- Documentation updates.
- [@raibima](https://github.com/raibima) in [#5132](https://github.com/apollographql/apollo-client/pull/5132)
+- Documentation updates.
+ [@raibima](https://github.com/raibima) in [#5132](https://github.com/apollographql/apollo-client/pull/5132)
[@hwillson](https://github.com/hwillson) in [#5141](https://github.com/apollographql/apollo-client/pull/5141)
## Apollo Client (2.6.3)
@@ -1638,13 +1664,12 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
### Apollo Client (2.6.3)
- A new `ObservableQuery.resetQueryStoreErrors()` method is now available that
- can be used to clear out `ObservableQuery` query store errors.
+ can be used to clear out `ObservableQuery` query store errors.
[@hwillson](https://github.com/hwillson) in [#4941](https://github.com/apollographql/apollo-client/pull/4941)
-- Documentation updates.
- [@michael-watson](https://github.com/michael-watson) in [#4940](https://github.com/apollographql/apollo-client/pull/4940)
+- Documentation updates.
+ [@michael-watson](https://github.com/michael-watson) in [#4940](https://github.com/apollographql/apollo-client/pull/4940)
[@hwillson](https://github.com/hwillson) in [#4969](https://github.com/apollographql/apollo-client/pull/4969)
-
## Apollo Client (2.6.1)
### Apollo Utilities 1.3.2
@@ -1677,27 +1702,29 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
### Apollo Client 2.6.0
- If you can be sure your application code does not modify cache result objects (see `freezeResults` note below), you can unlock substantial performance improvements by communicating this assumption via
+
```ts
- new ApolloClient({ assumeImmutableResults: true })
+ new ApolloClient({ assumeImmutableResults: true });
```
+
which allows the client to avoid taking defensive snapshots of past results using `cloneDeep`, as explained by [@benjamn](https://github.com/benjamn) in [#4543](https://github.com/apollographql/apollo-client/pull/4543).
- Identical overlapping queries are now deduplicated internally by `apollo-client`, rather than using the `apollo-link-dedup` package.
[@benjamn](https://github.com/benjamn) in commit [7cd8479f](https://github.com/apollographql/apollo-client/pull/4586/commits/7cd8479f27ce38930f122e4f703c4081a75a63a7)
- The `FetchPolicy` type has been split into two types, so that passing `cache-and-network` to `ApolloClient#query` is now forbidden at the type level, whereas previously it was forbidden by a runtime `invariant` assertion:
+
```ts
export type FetchPolicy =
- | 'cache-first'
- | 'network-only'
- | 'cache-only'
- | 'no-cache'
- | 'standby';
-
- export type WatchQueryFetchPolicy =
- | FetchPolicy
- | 'cache-and-network';
+ | "cache-first"
+ | "network-only"
+ | "cache-only"
+ | "no-cache"
+ | "standby";
+
+ export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";
```
+
The exception thrown if you ignore the type error has also been improved to explain the motivation behind this restriction.
[Issue #3130 (comment)](https://github.com/apollographql/apollo-client/issues/3130#issuecomment-478409066) and commit [cf069bc7](github.com/apollographql/apollo-client/commit/cf069bc7ee6577092234b0eb0ac32e05d50f5a1c)
@@ -1749,65 +1776,62 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- The `graphql` function can now be configured to ignore `@include` and
`@skip` directives (useful when walking a fragment to generate prop types
- or filter result data).
+ or filter result data).
[@GreenGremlin](https://github.com/GreenGremlin) in [#4373](https://github.com/apollographql/apollo-client/pull/4373)
-
## Apollo Client 2.5.1
### apollo-client 2.5.1
-- Fixes `A tuple type element list cannot be empty` issue.
+- Fixes `A tuple type element list cannot be empty` issue.
[@benjamn](https://github.com/benjamn) in [#4502](https://github.com/apollographql/apollo-client/pull/4502)
### graphql-anywhere 4.2.1
-- Adds back the missing `graphql-anywhere/lib/async` entry point.
+- Adds back the missing `graphql-anywhere/lib/async` entry point.
[@benjamn](https://github.com/benjamn) in [#4503](https://github.com/apollographql/apollo-client/pull/4503)
-
## Apollo Client (2.5.0)
### Apollo Client (2.5.0)
- Introduces new local state management features (client-side schema
and local resolver / `@client` support) and many overall code improvements,
- to help reduce the Apollo Client bundle size.
+ to help reduce the Apollo Client bundle size.
[#4361](https://github.com/apollographql/apollo-client/pull/4361)
-- Revamped CJS and ESM bundling approach with Rollup.
+- Revamped CJS and ESM bundling approach with Rollup.
[@rosskevin](https://github.com/rosskevin) in [#4261](https://github.com/apollographql/apollo-client/pull/4261)
- Fixes an issue where the `QueryManager` was accidentally returning cached
- data for `network-only` queries.
+ data for `network-only` queries.
[@danilobuerger](https://github.com/danilobuerger) in [#4352](https://github.com/apollographql/apollo-client/pull/4352)
- Fixed an issue in the repo `.gitattributes` that was causing binary files
to have their line endings adjusted, and cleaned up corrupted documentation
- images (ref: https://github.com/apollographql/apollo-client/pull/4232).
+ images (ref: https://github.com/apollographql/apollo-client/pull/4232).
[@rajington](https://github.com/rajington) in [#4438](https://github.com/apollographql/apollo-client/pull/4438)
-- Improve (and shorten) query polling implementation.
+- Improve (and shorten) query polling implementation.
[PR #4337](https://github.com/apollographql/apollo-client/pull/4337)
-
## Apollo Client (2.4.13)
### Apollo Client (2.4.13)
-- Resolve "invalidate" -> "invalidated" typo in `QueryManager`.
+- Resolve "invalidate" -> "invalidated" typo in `QueryManager`.
[@quazzie](https://github.com/quazzie) in [#4041](https://github.com/apollographql/apollo-client/pull/4041)
-- Properly type `setQuery` and fix now typed callers.
+- Properly type `setQuery` and fix now typed callers.
[@danilobuerger](https://github.com/danilobuerger) in [#4369](https://github.com/apollographql/apollo-client/pull/4369)
- Align with the React Apollo decision that result `data` should be
- `TData | undefined` instead of `TData | {}`.
+ `TData | undefined` instead of `TData | {}`.
[@danilobuerger](https://github.com/danilobuerger) in [#4356](https://github.com/apollographql/apollo-client/pull/4356)
-- Documentation updates.
- [@danilobuerger](https://github.com/danilobuerger) in [#4340](https://github.com/apollographql/apollo-client/pull/4340)
- [@justyn-clark](https://github.com/justyn-clark) in [#4383](https://github.com/apollographql/apollo-client/pull/4383)
- [@jtassin](https://github.com/jtassin) in [#4287](https://github.com/apollographql/apollo-client/pull/4287)
- [@Gongreg](https://github.com/Gongreg) in [#4386](https://github.com/apollographql/apollo-client/pull/4386)
- [@davecardwell](https://github.com/davecardwell) in [#4399](https://github.com/apollographql/apollo-client/pull/4399)
- [@michaelknoch](https://github.com/michaelknoch) in [#4384](https://github.com/apollographql/apollo-client/pull/4384)
+- Documentation updates.
+ [@danilobuerger](https://github.com/danilobuerger) in [#4340](https://github.com/apollographql/apollo-client/pull/4340)
+ [@justyn-clark](https://github.com/justyn-clark) in [#4383](https://github.com/apollographql/apollo-client/pull/4383)
+ [@jtassin](https://github.com/jtassin) in [#4287](https://github.com/apollographql/apollo-client/pull/4287)
+ [@Gongreg](https://github.com/Gongreg) in [#4386](https://github.com/apollographql/apollo-client/pull/4386)
+ [@davecardwell](https://github.com/davecardwell) in [#4399](https://github.com/apollographql/apollo-client/pull/4399)
+ [@michaelknoch](https://github.com/michaelknoch) in [#4384](https://github.com/apollographql/apollo-client/pull/4384)
## Apollo Client (2.4.12)
@@ -1869,6 +1893,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
`apollo-utilities`, since `getDirectiveNames` has been reimplemented
without using `flattenSelections`, and `flattenSelections` has no clear
purpose now. If you need the old functionality, use a visitor:
+
```ts
import { visit } from "graphql/language/visitor";
@@ -1877,7 +1902,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
visit(selection, {
SelectionSet(ss) {
selections.push(...ss.selections);
- }
+ },
});
return selections;
}
@@ -1887,73 +1912,73 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
### Apollo Client (2.4.9)
-- Apollo Client has been updated to use `graphql` 14.x as a dev dependency.
+- Apollo Client has been updated to use `graphql` 14.x as a dev dependency.
[@hwillson](https://github.com/hwillson) in [#4233](https://github.com/apollographql/apollo-client/pull/4233)
- The `onClearStore` function can now be used to register callbacks that should
- be triggered when calling `clearStore`.
+ be triggered when calling `clearStore`.
[@joe-re](https://github.com/joe-re) in [#4082](https://github.com/apollographql/apollo-client/pull/4082)
-- Make `isApolloError` available for external use.
+- Make `isApolloError` available for external use.
[@FredyC](https://github.com/FredyC) in [#4223](https://github.com/apollographql/apollo-client/pull/4223)
- The `QueryManager` now calls `complete` on the observables used by
Apollo Client's Subscription handling. This gives finite subscriptions a
- chance to handle cleanup.
+ chance to handle cleanup.
[@sujeetsr](https://github.com/sujeetsr) in [#4290](https://github.com/apollographql/apollo-client/pull/4290)
-- Documentation updates.
- [@lifedup](https://github.com/lifedup) in [#3931](https://github.com/apollographql/apollo-client/pull/3931)
- [@Dem0n3D](https://github.com/Dem0n3D) in [#4008](https://github.com/apollographql/apollo-client/pull/4008)
- [@anand-sundaram-zocdoc](https://github.com/anand-sundaram-zocdoc) in [#4009](https://github.com/apollographql/apollo-client/pull/4009)
- [@mattphoto](https://github.com/mattphoto) in [#4026](https://github.com/apollographql/apollo-client/pull/4026)
- [@birge](https://github.com/birge) in [#4029](https://github.com/apollographql/apollo-client/pull/4029)
- [@mxstbr](https://github.com/mxstbr) in [#4127](https://github.com/apollographql/apollo-client/pull/4127)
- [@Caerbannog](https://github.com/Caerbannog) in [#4140](https://github.com/apollographql/apollo-client/pull/4140)
- [@jedwards1211](https://github.com/jedwards1211) in [#4179](https://github.com/apollographql/apollo-client/pull/4179)
- [@nutboltu](https://github.com/nutboltu) in [#4182](https://github.com/apollographql/apollo-client/pull/4182)
- [@CarloPalinckx](https://github.com/CarloPalinckx) in [#4189](https://github.com/apollographql/apollo-client/pull/4189)
- [@joebernard](https://github.com/joebernard) in [#4206](https://github.com/apollographql/apollo-client/pull/4206)
- [@evans](https://github.com/evans) in [#4213](https://github.com/apollographql/apollo-client/pull/4213)
- [@danilobuerger](https://github.com/danilobuerger) in [#4214](https://github.com/apollographql/apollo-client/pull/4214)
- [@stubailo](https://github.com/stubailo) in [#4220](https://github.com/apollographql/apollo-client/pull/4220)
- [@haysclark](https://github.com/haysclark) in [#4255](https://github.com/apollographql/apollo-client/pull/4255)
- [@shelmire](https://github.com/shelmire) in [#4266](https://github.com/apollographql/apollo-client/pull/4266)
- [@peggyrayzis](https://github.com/peggyrayzis) in [#4280](https://github.com/apollographql/apollo-client/pull/4280)
+- Documentation updates.
+ [@lifedup](https://github.com/lifedup) in [#3931](https://github.com/apollographql/apollo-client/pull/3931)
+ [@Dem0n3D](https://github.com/Dem0n3D) in [#4008](https://github.com/apollographql/apollo-client/pull/4008)
+ [@anand-sundaram-zocdoc](https://github.com/anand-sundaram-zocdoc) in [#4009](https://github.com/apollographql/apollo-client/pull/4009)
+ [@mattphoto](https://github.com/mattphoto) in [#4026](https://github.com/apollographql/apollo-client/pull/4026)
+ [@birge](https://github.com/birge) in [#4029](https://github.com/apollographql/apollo-client/pull/4029)
+ [@mxstbr](https://github.com/mxstbr) in [#4127](https://github.com/apollographql/apollo-client/pull/4127)
+ [@Caerbannog](https://github.com/Caerbannog) in [#4140](https://github.com/apollographql/apollo-client/pull/4140)
+ [@jedwards1211](https://github.com/jedwards1211) in [#4179](https://github.com/apollographql/apollo-client/pull/4179)
+ [@nutboltu](https://github.com/nutboltu) in [#4182](https://github.com/apollographql/apollo-client/pull/4182)
+ [@CarloPalinckx](https://github.com/CarloPalinckx) in [#4189](https://github.com/apollographql/apollo-client/pull/4189)
+ [@joebernard](https://github.com/joebernard) in [#4206](https://github.com/apollographql/apollo-client/pull/4206)
+ [@evans](https://github.com/evans) in [#4213](https://github.com/apollographql/apollo-client/pull/4213)
+ [@danilobuerger](https://github.com/danilobuerger) in [#4214](https://github.com/apollographql/apollo-client/pull/4214)
+ [@stubailo](https://github.com/stubailo) in [#4220](https://github.com/apollographql/apollo-client/pull/4220)
+ [@haysclark](https://github.com/haysclark) in [#4255](https://github.com/apollographql/apollo-client/pull/4255)
+ [@shelmire](https://github.com/shelmire) in [#4266](https://github.com/apollographql/apollo-client/pull/4266)
+ [@peggyrayzis](https://github.com/peggyrayzis) in [#4280](https://github.com/apollographql/apollo-client/pull/4280)
[@caydie-tran](https://github.com/caydie-tran) in [#4300](https://github.com/apollographql/apollo-client/pull/4300)
### Apollo Utilities (1.1.0)
- Transformation utilities have been refactored to work with `graphql` 14.x.
- GraphQL AST's are no longer being directly modified.
+ GraphQL AST's are no longer being directly modified.
[@hwillson](https://github.com/hwillson) in [#4233](https://github.com/apollographql/apollo-client/pull/4233)
### Apollo Cache In-Memory (1.4.0)
- The speed and memory usage of optimistic reads and writes has been
improved dramatically using a new layering technique that does not
- require copying the non-optimistic contents of the cache.
+ require copying the non-optimistic contents of the cache.
[PR #4319](https://github.com/apollographql/apollo-client/pull/4319/)
- The `RecordingCache` abstraction has been removed, and thus is no longer
- exported from `apollo-cache-inmemory`.
+ exported from `apollo-cache-inmemory`.
[PR #4319](https://github.com/apollographql/apollo-client/pull/4319/)
- Export the optimism `wrap` function using ES2015 export syntax, instead of
- CommonJS.
+ CommonJS.
[@ardatan](https://github.com/ardatan) in [#4158](https://github.com/apollographql/apollo-client/pull/4158)
## Apollo Client (2.4.8)
### Apollo Client (2.4.8)
-- Documentation and config updates.
- [@justinanastos](https://github.com/justinanastos) in [#4187](https://github.com/apollographql/apollo-client/pull/4187)
- [@PowerKiKi](https://github.com/PowerKiKi) in [#3693](https://github.com/apollographql/apollo-client/pull/3693)
+- Documentation and config updates.
+ [@justinanastos](https://github.com/justinanastos) in [#4187](https://github.com/apollographql/apollo-client/pull/4187)
+ [@PowerKiKi](https://github.com/PowerKiKi) in [#3693](https://github.com/apollographql/apollo-client/pull/3693)
[@nandito](https://github.com/nandito) in [#3865](https://github.com/apollographql/apollo-client/pull/3865)
- Schema/AST tranformation utilities have been updated to work properly with
- `@client` directives.
+ `@client` directives.
[@justinmakaila](https://github.com/justinmakaila) in [#3482](https://github.com/apollographql/apollo-client/pull/3482)
### Apollo Cache In-Memory (1.3.12)
@@ -1967,8 +1992,8 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
reads is not worth the extra memory usage in your application:
```ts
new InMemoryCache({
- resultCaching: false
- })
+ resultCaching: false,
+ });
```
Part of [PR #4521](https://github.com/apollographql/apollo-client/pull/4251).
@@ -1980,7 +2005,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
`version` params, that can be used to support Apollo Server [Client Awareness](https://www.apollographql.com/docs/apollo-server/v2/features/metrics.html#Client-Awareness)
functionality. These client awareness properties are passed into the
defined Apollo Link chain, and are then ultimately sent out as custom
- headers with outgoing requests.
+ headers with outgoing requests.
[@hwillson](https://github.com/hwillson) in [#4154](https://github.com/apollographql/apollo-client/pull/4154)
### Apollo Boost (0.1.22)
@@ -2003,7 +2028,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- No changes.
-
## Apollo Client (2.4.6)
### Apollo Cache In-Memory (1.3.10)
@@ -2076,14 +2100,14 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
## Apollo Client (2.4.3)
- Add additional checks to make sure we don't try to set the network status
- of queries in the store, when the store doesn't exist.
+ of queries in the store, when the store doesn't exist.
[@i6mi6](https://github.com/i6mi6) in [#3914](https://github.com/apollographql/apollo-client/pull/3914)
-- Documentation updates.
- [@shanonvl](https://github.com/shanonvl) in [#3925](https://github.com/apollographql/apollo-client/pull/3925)
- [@ojh102](https://github.com/ojh102) in [#3920](https://github.com/apollographql/apollo-client/pull/3920)
- [@Bkucera](https://github.com/Bkucera) in [#3919](https://github.com/apollographql/apollo-client/pull/3919)
- [@j4chou](https://github.com/j4chou) in [#3915](https://github.com/apollographql/apollo-client/pull/3915)
- [@billfienberg](https://github.com/billfienberg) in [#3886](https://github.com/apollographql/apollo-client/pull/3886)
+- Documentation updates.
+ [@shanonvl](https://github.com/shanonvl) in [#3925](https://github.com/apollographql/apollo-client/pull/3925)
+ [@ojh102](https://github.com/ojh102) in [#3920](https://github.com/apollographql/apollo-client/pull/3920)
+ [@Bkucera](https://github.com/Bkucera) in [#3919](https://github.com/apollographql/apollo-client/pull/3919)
+ [@j4chou](https://github.com/j4chou) in [#3915](https://github.com/apollographql/apollo-client/pull/3915)
+ [@billfienberg](https://github.com/billfienberg) in [#3886](https://github.com/apollographql/apollo-client/pull/3886)
[@TLadd](https://github.com/TLadd) in [#3884](https://github.com/apollographql/apollo-client/pull/3884)
- The `ObservableQuery` class now makes a deep clone of `lastResult` when
@@ -2117,7 +2141,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
### Apollo GraphQL Anywhere (4.1.20)
-- Make `graphql-anywhere` `filter` function generic (typescript).
+- Make `graphql-anywhere` `filter` function generic (typescript).
[@minznerjosh](https://github.com/minznerjosh) in [#3929](https://github.com/apollographql/apollo-client/pull/3929)
### Apollo Utilities (1.0.22)
@@ -2152,7 +2176,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- Replace the custom `cloneDeep` implementation with
[`fclone`](https://www.npmjs.com/package/fclone), to avoid crashing when
- encountering circular references.
+ encountering circular references.
[@hwillson](https://github.com/hwillson) in [#3881](https://github.com/apollographql/apollo-client/pull/3881)
### Apollo Boost (0.1.16)
@@ -2171,7 +2195,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- No changes.
-
## 2.4.1 (August 26, 2018)
### Apollo Client (2.4.1)
@@ -2204,10 +2227,10 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
The `CUSTOMER_MESSAGES_QUERY` above will be refetched using `context`.
Normally queries are refetched using the original context they were first
- started with, but this provides a way to override the context, if needed.
+ started with, but this provides a way to override the context, if needed.
[@hwillson](https://github.com/hwillson) in [#3852](https://github.com/apollographql/apollo-client/pull/3852)
-- Documentation updates.
+- Documentation updates.
[@hwillson](https://github.com/hwillson) in [#3841](https://github.com/apollographql/apollo-client/pull/3841)
### Apollo Boost (0.1.15)
@@ -2240,7 +2263,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
testing, etc.
[@hwillson](https://github.com/hwillson) in [#3817](https://github.com/apollographql/apollo-client/pull/3817)
-
## 2.4.0 (August 17, 2018)
### Apollo Client (2.4.0)
@@ -2253,32 +2275,32 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
`error` handler defined, the previous functionality is maintained, meaning
the error is passed in the result, giving the next handler a chance to deal
with it. This should help address backwards compatibility (and is the reason
- for the minor version bumo in this release).
+ for the minor version bumo in this release).
[@clayne11](https://github.com/clayne11) in [#3800](https://github.com/apollographql/apollo-client/pull/3800)
- Allow an `optimistic` param to be passed into `ApolloClient.readQuery` and
`ApolloClient.readFragment`, that when set to `true`, will allow
- optimistic results to be returned. Is `false` by default.
+ optimistic results to be returned. Is `false` by default.
[@jay1337](https://github.com/jay1337) in [#2429](https://github.com/apollographql/apollo-client/pull/2429)
-- Optimistic tests cleanup.
+- Optimistic tests cleanup.
[@joshribakoff](https://github.com/joshribakoff) in [#3713](https://github.com/apollographql/apollo-client/pull/3713)
- Make sure each package has its own `.npmignore`, so they're taken into
- consideration when publishing via lerna.
+ consideration when publishing via lerna.
[@hwillson](https://github.com/hwillson) in [#3828](https://github.com/apollographql/apollo-client/pull/3828)
-- Documentation updates.
- [@toolness](https://github.com/toolness) in [#3804](https://github.com/apollographql/apollo-client/pull/3804)
- [@pungggi](https://github.com/pungggi) in [#3798](https://github.com/apollographql/apollo-client/pull/3798)
- [@lorensr](https://github.com/lorensr) in [#3748](https://github.com/apollographql/apollo-client/pull/3748)
- [@joshribakoff](https://github.com/joshribakoff) in [#3730](https://github.com/apollographql/apollo-client/pull/3730)
- [@yalamber](https://github.com/yalamber) in [#3819](https://github.com/apollographql/apollo-client/pull/3819)
- [@pschreibs85](https://github.com/pschreibs85) in [#3812](https://github.com/apollographql/apollo-client/pull/3812)
- [@msreekm](https://github.com/msreekm) in [#3808](https://github.com/apollographql/apollo-client/pull/3808)
- [@kamaltmo](https://github.com/kamaltmo) in [#3806](https://github.com/apollographql/apollo-client/pull/3806)
- [@lorensr](https://github.com/lorensr) in [#3739](https://github.com/apollographql/apollo-client/pull/3739)
+- Documentation updates.
+ [@toolness](https://github.com/toolness) in [#3804](https://github.com/apollographql/apollo-client/pull/3804)
+ [@pungggi](https://github.com/pungggi) in [#3798](https://github.com/apollographql/apollo-client/pull/3798)
+ [@lorensr](https://github.com/lorensr) in [#3748](https://github.com/apollographql/apollo-client/pull/3748)
+ [@joshribakoff](https://github.com/joshribakoff) in [#3730](https://github.com/apollographql/apollo-client/pull/3730)
+ [@yalamber](https://github.com/yalamber) in [#3819](https://github.com/apollographql/apollo-client/pull/3819)
+ [@pschreibs85](https://github.com/pschreibs85) in [#3812](https://github.com/apollographql/apollo-client/pull/3812)
+ [@msreekm](https://github.com/msreekm) in [#3808](https://github.com/apollographql/apollo-client/pull/3808)
+ [@kamaltmo](https://github.com/kamaltmo) in [#3806](https://github.com/apollographql/apollo-client/pull/3806)
+ [@lorensr](https://github.com/lorensr) in [#3739](https://github.com/apollographql/apollo-client/pull/3739)
[@brainkim](https://github.com/brainkim) in [#3680](https://github.com/apollographql/apollo-client/pull/3680)
### Apollo Cache In-Memory (1.2.8)
-- Fix typo in `console.warn` regarding fragment matching error message.
+- Fix typo in `console.warn` regarding fragment matching error message.
[@combizs](https://github.com/combizs) in [#3701](https://github.com/apollographql/apollo-client/pull/3701)
### Apollo Boost (0.1.14)
@@ -2297,7 +2319,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- No changes.
-
## 2.3.8 (August 9, 2018)
### Apollo Client (2.3.8)
@@ -2306,32 +2327,32 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
Since the ^ operator only covers any minor version if the major version
is not 0 (since a major version of 0 is technically considered development by
semver 2), the current ^0.11.0 || ^14.0.0 graphql range doesn't cover
- 0.12.* or 0.13.*. This fixes the `apollo-client@X has incorrect peer
- dependency "graphql@^0.11.0 || ^14.0.0"` errors that people might have
- seen using `graphql` 0.12.x or 0.13.x.
+ 0.12._ or 0.13._. This fixes the `apollo-client@X has incorrect peer
+dependency "graphql@^0.11.0 || ^14.0.0"` errors that people might have
+ seen using `graphql` 0.12.x or 0.13.x.
[@hwillson](https://github.com/hwillson) in [#3746](https://github.com/apollographql/apollo-client/pull/3746)
-- Document `setVariables` internal API status.
+- Document `setVariables` internal API status.
[@PowerKiKi](https://github.com/PowerKiKi) in [#3692](https://github.com/apollographql/apollo-client/pull/3692)
-- Corrected `ApolloClient.queryManager` typing as it may be `undefined`.
+- Corrected `ApolloClient.queryManager` typing as it may be `undefined`.
[@danilobuerger](https://github.com/danilobuerger) in [#3661](https://github.com/apollographql/apollo-client/pull/3661)
- Make sure using a `no-cache` fetch policy with subscriptions prevents data
- from being cached.
+ from being cached.
[@hwillson](https://github.com/hwillson) in [#3773](https://github.com/apollographql/apollo-client/pull/3773)
- Fixed an issue that sometimes caused empty query results, when using the
- `no-cache` fetch policy.
+ `no-cache` fetch policy.
[@hwillson](https://github.com/hwillson) in [#3777](https://github.com/apollographql/apollo-client/pull/3777)
-- Documentation updates.
- [@hwillson](https://github.com/hwillson) in [#3750](https://github.com/apollographql/apollo-client/pull/3750)
- [@hwillson](https://github.com/hwillson) in [#3754](https://github.com/apollographql/apollo-client/pull/3754)
- [@TheMightyPenguin](https://github.com/TheMightyPenguin) in [#3725](https://github.com/apollographql/apollo-client/pull/3725)
- [@bennypowers](https://github.com/bennypowers) in [#3668](https://github.com/apollographql/apollo-client/pull/3668)
- [@hwillson](https://github.com/hwillson) in [#3762](https://github.com/apollographql/apollo-client/pull/3762)
- [@chentsulin](https://github.com/chentsulin) in [#3688](https://github.com/apollographql/apollo-client/pull/3688)
- [@chentsulin](https://github.com/chentsulin) in [#3687](https://github.com/apollographql/apollo-client/pull/3687)
- [@ardouglass](https://github.com/ardouglass) in [#3645](https://github.com/apollographql/apollo-client/pull/3645)
- [@hwillson](https://github.com/hwillson) in [#3764](https://github.com/apollographql/apollo-client/pull/3764)
- [@hwillson](https://github.com/hwillson) in [#3767](https://github.com/apollographql/apollo-client/pull/3767)
- [@hwillson](https://github.com/hwillson) in [#3774](https://github.com/apollographql/apollo-client/pull/3774)
+- Documentation updates.
+ [@hwillson](https://github.com/hwillson) in [#3750](https://github.com/apollographql/apollo-client/pull/3750)
+ [@hwillson](https://github.com/hwillson) in [#3754](https://github.com/apollographql/apollo-client/pull/3754)
+ [@TheMightyPenguin](https://github.com/TheMightyPenguin) in [#3725](https://github.com/apollographql/apollo-client/pull/3725)
+ [@bennypowers](https://github.com/bennypowers) in [#3668](https://github.com/apollographql/apollo-client/pull/3668)
+ [@hwillson](https://github.com/hwillson) in [#3762](https://github.com/apollographql/apollo-client/pull/3762)
+ [@chentsulin](https://github.com/chentsulin) in [#3688](https://github.com/apollographql/apollo-client/pull/3688)
+ [@chentsulin](https://github.com/chentsulin) in [#3687](https://github.com/apollographql/apollo-client/pull/3687)
+ [@ardouglass](https://github.com/ardouglass) in [#3645](https://github.com/apollographql/apollo-client/pull/3645)
+ [@hwillson](https://github.com/hwillson) in [#3764](https://github.com/apollographql/apollo-client/pull/3764)
+ [@hwillson](https://github.com/hwillson) in [#3767](https://github.com/apollographql/apollo-client/pull/3767)
+ [@hwillson](https://github.com/hwillson) in [#3774](https://github.com/apollographql/apollo-client/pull/3774)
[@hwillson](https://github.com/hwillson) in [#3779](https://github.com/apollographql/apollo-client/pull/3779)
### Apollo Boost (0.1.13)
@@ -2354,7 +2375,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- No changes.
-
## 2.3.7 (July 24, 2018)
### Apollo Client (2.3.7)
@@ -2366,14 +2386,13 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
caused by the typescript compiler getting confused at compile/publish time.
`getQueryWithPreviousResult` return types are now excplicity identified,
which helps Typescript avoid the local type reference. For more details,
- see https://github.com/apollographql/apollo-client/issues/3729.
+ see https://github.com/apollographql/apollo-client/issues/3729.
[@hwillson](https://github.com/hwillson) in [#3731](https://github.com/apollographql/apollo-client/pull/3731)
### Apollo Boost (0.1.12)
- No changes.
-
## 2.3.6 (July 24, 2018)
### Apollo Client (2.3.6)
@@ -2435,7 +2454,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
when attempting to report a missing property on an object.
[@benjie](https://github.com/benjie) in [#3618](https://github.com/apollographql/apollo-client/pull/3618)
-
## 2.3.5 (June 19, 2018)
### Apollo Client (2.3.5)
@@ -2470,7 +2488,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- No changes.
-
## 2.3.4 (June 13, 2018)
### Apollo Client (2.3.4)
@@ -2502,7 +2519,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- No changes
-
## 2.3.3 (June 13, 2018)
### Apollo Client (2.3.3)
@@ -2556,7 +2572,6 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- No new changes.
-
## 2.3.2 (May 29, 2018)
### Apollo Client (2.3.2)
diff --git a/package-lock.json b/package-lock.json
index e46e2c33d1f..92b55ee81aa 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@apollo/client",
- "version": "3.7.2",
+ "version": "3.7.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@apollo/client",
- "version": "3.7.2",
+ "version": "3.7.3",
"license": "MIT",
"dependencies": {
"@graphql-typed-document-node/core": "^3.1.1",
diff --git a/package.json b/package.json
index e489305576a..61aefa2632f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@apollo/client",
- "version": "3.7.2",
+ "version": "3.7.3",
"description": "A fully-featured caching GraphQL client.",
"private": true,
"keywords": [