This repository was archived by the owner on Apr 4, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump @apollo/client from 3.3.21 to 3.4.5 (#570)
Bumps [@apollo/client](https://github.com/apollographql/apollo-client) from 3.3.21 to 3.4.5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/apollographql/apollo-client/releases"><code>@apollo/client</code>'s releases</a>.</em></p> <blockquote> <h2>3.4.0</h2> <h2>Apollo Client 3.4.0</h2> <h3>New documentation</h3> <ul> <li><a href="https://www.apollographql.com/docs/react/data/refetching/"><strong>Refetching queries</strong></a> with <code>client.refetchQueries</code>. <a href="https://github.com/StephenBarlow"><code>@StephenBarlow</code></a> and <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8265">#8265</a></li> </ul> <h3>Improvements</h3> <ul> <li> <p><code>InMemoryCache</code> now <em>guarantees</em> that any two result objects returned by the cache (from <code>readQuery</code>, <code>readFragment</code>, etc.) will be referentially equal (<code>===</code>) if they are deeply equal. Previously, <code>===</code> equality was often achievable for results for the same query, on a best-effort basis. Now, equivalent result objects will be automatically shared among the result trees of completely different queries. This guarantee is important for taking full advantage of optimistic updates that correctly guess the final data, and for "pure" UI components that can skip re-rendering when their input data are unchanged. <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7439">#7439</a></p> </li> <li> <p>Mutations now accept an optional callback function called <code>onQueryUpdated</code>, which will be passed the <code>ObservableQuery</code> and <code>Cache.DiffResult</code> objects for any queries invalidated by cache writes performed by the mutation's final <code>update</code> function. Using <code>onQueryUpdated</code>, you can override the default <code>FetchPolicy</code> of the query, by (for example) calling <code>ObservableQuery</code> methods like <code>refetch</code> to force a network request. This automatic detection of invalidated queries provides an alternative to manually enumerating queries using the <code>refetchQueries</code> mutation option. Also, if you return a <code>Promise</code> from <code>onQueryUpdated</code>, the mutation will automatically await that <code>Promise</code>, rendering the <code>awaitRefetchQueries</code> option unnecessary. <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7827">#7827</a></p> </li> <li> <p>Support <code>client.refetchQueries</code> as an imperative way to refetch queries, without having to pass <code>options.refetchQueries</code> to <code>client.mutate</code>. <a href="https://github.com/dannycochran"><code>@dannycochran</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7431">#7431</a></p> </li> <li> <p>Improve standalone <code>client.refetchQueries</code> method to support automatic detection of queries needing to be refetched. <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8000">#8000</a></p> </li> <li> <p>Fix remaining barriers to loading <a href="https://cdn.jsdelivr.net/npm/@apollo/client@beta/core/+esm"><code>@apollo/client/core</code></a> as native ECMAScript modules from a CDN like <a href="https://www.jsdelivr.com/esm">esm.run</a>. Importing <code>@apollo/client</code> from a CDN will become possible once we move all React-related dependencies into <code>@apollo/client/react</code> in Apollo Client 4. <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/issues/8266">#8266</a></p> </li> <li> <p><code>InMemoryCache</code> supports a new method called <code>batch</code>, which is similar to <code>performTransaction</code> but takes named options rather than positional parameters. One of these named options is an <code>onDirty(watch, diff)</code> callback, which can be used to determine which watched queries were invalidated by the <code>batch</code> operation. <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7819">#7819</a></p> </li> <li> <p>Allow <code>merge: true</code> field policy to merge <code>Reference</code> objects with non-normalized objects, and vice-versa. <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7778">#7778</a></p> </li> <li> <p>Allow identical subscriptions to be deduplicated by default, like queries. <a href="https://github.com/jkossis"><code>@jkossis</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/6910">#6910</a></p> </li> <li> <p>Always use <code>POST</code> request when falling back to sending full query with <code>@apollo/client/link/persisted-queries</code>. <a href="https://github.com/rieset"><code>@rieset</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7456">#7456</a></p> </li> <li> <p>The <code>FetchMoreQueryOptions</code> type now takes two instead of three type parameters (<code><TVariables, TData></code>), thanks to using <code>Partial<TVariables></code> instead of <code>K extends typeof TVariables</code> and <code>Pick<TVariables, K></code>. <a href="https://github.com/ArnaudBarre"><code>@ArnaudBarre</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7476">#7476</a></p> </li> <li> <p>Pass <code>variables</code> and <code>context</code> to a mutation's <code>update</code> function. <strong>Note:</strong> The type of the <code>update</code> function is now named <code>MutationUpdaterFunction</code> rather than <code>MutationUpdaterFn</code>, since the older type was <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/issues/8506#issuecomment-881706613">broken beyond repair</a>. If you are using <code>MutationUpdaterFn</code> in your own code, please use <code>MutationUpdaterFunction</code> instead. <a href="https://github.com/jcreighton"><code>@jcreighton</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7902">#7902</a></p> </li> <li> <p>A <code>resultCacheMaxSize</code> option may be passed to the <code>InMemoryCache</code> constructor to limit the number of result objects that will be retained in memory (to speed up repeated reads), and calling <code>cache.reset()</code> now releases all such memory. <a href="https://github.com/SofianHn"><code>@SofianHn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8701">#8701</a></p> </li> <li> <p>Fully remove result cache entries from LRU dependency system when the corresponding entities are removed from <code>InMemoryCache</code> by eviction, or by any other means. <a href="https://github.com/sofianhn"><code>@sofianhn</code></a> and <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8147">#8147</a></p> </li> <li> <p>Expose missing field errors in results.</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md"><code>@apollo/client</code>'s changelog</a>.</em></p> <blockquote> <h2>Apollo Client 3.4.5</h2> <h3>Bug Fixes</h3> <ul> <li> <p>Fix double registration bug for mutation <code>refetchQueries</code> specified using legacy one-time <code>refetchQueries: [{ query, variables }]</code> style. Though the bug is fixed, we recommend using <code>refetchQueries: [query]</code> instead (when possible) to refetch an existing query using its <code>DocumentNode</code>, rather than creating, executing, and then deleting a new query, as the legacy <code>{ query, variables }</code> style unfortunately does. <!-- raw HTML omitted --> <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8586">#8586</a></p> </li> <li> <p>Fix <code>useQuery</code>/<code>useLazyQuery</code> stalling when clients or queries change. <!-- raw HTML omitted --> <a href="https://github.com/brainkim"><code>@brainkim</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8589">#8589</a></p> </li> </ul> <h2>Apollo Client 3.4.4</h2> <h3>Bug Fixes</h3> <ul> <li>Revert accidental addition of <code>engines.npm</code> section to published version of <code>@apollo/client/package.json</code>. <!-- raw HTML omitted --> <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8578">#8578</a></li> </ul> <h2>Apollo Client 3.4.3</h2> <h3>Bug Fixes</h3> <ul> <li>Fix <code>{ ssr: false }</code> causing queries to hang on the client. <!-- raw HTML omitted --> <a href="https://github.com/brainkim"><code>@brainkim</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8574">#8574</a></li> </ul> <h2>Apollo Client 3.4.2</h2> <h3>Bug Fixes</h3> <ul> <li>Use more default type parameters for mutation-related types in <code>react/types/types.ts</code>, to provide smoother backwards compatibility for code using those types explicitly. <!-- raw HTML omitted --> <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8573">#8573</a></li> </ul> <h2>Apollo Client 3.4.1</h2> <h3>Bug Fixes</h3> <ul> <li>Initialize <code>stringifyCanon</code> lazily, when <code>canonicalStringify</code> is first called, fixing <code>Uncaught ReferenceError: __DEV__ is not defined</code> errors due to usage of <code>__DEV__</code> before declaration. <!-- raw HTML omitted --> <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8557">#8557</a></li> </ul> <h2>Apollo Client 3.4.0</h2> <h3>New documentation</h3> <ul> <li><a href="https://www.apollographql.com/docs/react/data/refetching/"><strong>Refetching queries</strong></a> with <code>client.refetchQueries</code>. <!-- raw HTML omitted --> <a href="https://github.com/StephenBarlow"><code>@StephenBarlow</code></a> and <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/8265">#8265</a></li> </ul> <h3>Improvements</h3> <ul> <li><code>InMemoryCache</code> now <em>guarantees</em> that any two result objects returned by the cache (from <code>readQuery</code>, <code>readFragment</code>, etc.) will be referentially equal (<code>===</code>) if they are deeply equal. Previously, <code>===</code> equality was often achievable for results for the same query, on a best-effort basis. Now, equivalent result objects will be automatically shared among the result trees of completely different queries. This guarantee is important for taking full advantage of optimistic updates that correctly guess the final data, and for "pure" UI components that can skip re-rendering when their input data are unchanged. <!-- raw HTML omitted --> <a href="https://github.com/benjamn"><code>@benjamn</code></a> in <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/pull/7439">#7439</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/apollographql/apollo-client/commit/4630b6f0ac88774b7b6099b853fc70027685b97e"><code>4630b6f</code></a> Bump <code>@apollo/client</code> npm version to 3.4.5.</li> <li><a href="https://github.com/apollographql/apollo-client/commit/dd594ebaf299cdcac2a134c7ac1bbd2ef908401e"><code>dd594eb</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/issues/8589">#8589</a> from apollographql/brian-stall-hotfix</li> <li><a href="https://github.com/apollographql/apollo-client/commit/1fa2b273a4a4cd24e5d5bb85a3b5858a86f99d63"><code>1fa2b27</code></a> update CHANGELOG.md</li> <li><a href="https://github.com/apollographql/apollo-client/commit/a759608e635000ff28af309e80aeee248075b91f"><code>a759608</code></a> stop new useQuery test from flaking</li> <li><a href="https://github.com/apollographql/apollo-client/commit/9e48ec5c35f12eb25798dbf81ee938f1575500ee"><code>9e48ec5</code></a> add observableQuery to deps array</li> <li><a href="https://github.com/apollographql/apollo-client/commit/634a203eabd37d47c1cb0883bc105103ebec75d2"><code>634a203</code></a> add a test for changing queries</li> <li><a href="https://github.com/apollographql/apollo-client/commit/d96742b4f49030e9dc7752f3b5ea166c873d671d"><code>d96742b</code></a> Fix double registration bug for mutation <code>refetchQueries</code> using legacy style ...</li> <li><a href="https://github.com/apollographql/apollo-client/commit/117e7213b12df1bf4c099957a57d0e869ea3d4a6"><code>117e721</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/apollographql/apollo-client/issues/8581">#8581</a> from apollographql/brian-testing-1</li> <li><a href="https://github.com/apollographql/apollo-client/commit/ddadc940ec7373e1408b53c13c5ba5617453ef37"><code>ddadc94</code></a> add some partialData Query tests to hooks</li> <li><a href="https://github.com/apollographql/apollo-client/commit/6ff8e32a06ee9f932808e6a3135e7206ab9ce05a"><code>6ff8e32</code></a> delete stripSymbols test utility</li> <li>Additional commits viewable in <a href="https://github.com/apollographql/apollo-client/compare/v3.3.21...v3.4.5">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
- Loading branch information