diff --git a/.changeset/pre.json b/.changeset/pre.json
index 9ca3955aff5..2f9b60e608e 100644
--- a/.changeset/pre.json
+++ b/.changeset/pre.json
@@ -6,7 +6,7 @@
},
"changesets": [
"early-pens-retire",
- "shiny-balloons-matter",
+ "sixty-trains-sniff",
"small-timers-shake"
]
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91dc7d99b73..930a573172b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# @apollo/client
+## 3.8.0-alpha.1
+
+### Patch Changes
+
+- [#10324](https://github.com/apollographql/apollo-client/pull/10324) [`95eb228be`](https://github.com/apollographql/apollo-client/commit/95eb228bedc193a520604e351d1c455bfbedef06) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `@defer` support to `useSuspenseQuery`.
+
## 3.8.0-alpha.0
### Minor Changes
@@ -352,7 +358,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
const { resolver: defaultResolver } = getDefaultConfig.getDefaultValues();
exports.resolver = {
...defaultResolver,
- sourceExts: [...defaultResolver.sourceExts, "cjs"],
+ sourceExts: [...defaultResolver.sourceExts, 'cjs'],
};
```
@@ -1059,11 +1065,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)
@@ -1434,8 +1440,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)
+ > 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)
- **[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)
@@ -1481,7 +1486,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
fields: {
comments(comments: Reference[], { readField }) {
return comments.filter(
- (comment) => idToRemove !== readField("id", comment)
+ (comment) => idToRemove !== readField('id', comment)
);
},
},
@@ -1495,12 +1500,12 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- `InMemoryCache` provides a new API for storing client state that can be updated from anywhere:
```ts
- import { makeVar } from "@apollo/client";
+ 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
+ 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.
@@ -1552,7 +1557,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- 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)
@@ -1571,8 +1576,7 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
- **[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)
+ > 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)
- 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)
@@ -1728,13 +1732,13 @@ In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling o
```ts
export type FetchPolicy =
- | "cache-first"
- | "network-only"
- | "cache-only"
- | "no-cache"
- | "standby";
+ | 'cache-first'
+ | 'network-only'
+ | 'cache-only'
+ | 'no-cache'
+ | 'standby';
- export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";
+ 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.
@@ -2339,8 +2343,7 @@ 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
+ 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.
diff --git a/package-lock.json b/package-lock.json
index fab7cb937a4..c685915c706 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@apollo/client",
- "version": "3.8.0-alpha.0",
+ "version": "3.8.0-alpha.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@apollo/client",
- "version": "3.8.0-alpha.0",
+ "version": "3.8.0-alpha.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index a63906be6d1..3c434043b7b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@apollo/client",
- "version": "3.8.0-alpha.0",
+ "version": "3.8.0-alpha.1",
"description": "A fully-featured caching GraphQL client.",
"private": true,
"keywords": [