Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new pull request by comparing changes across two branches #440

Merged
merged 7 commits into from
Mar 13, 2024
Merged
5 changes: 5 additions & 0 deletions .changeset/early-pens-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Make `useRenderGuard` more resilient to changes in React internals.
5 changes: 5 additions & 0 deletions .changeset/little-squids-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Adds a fix for multipart subscriptions that terminate with payload: null
6 changes: 5 additions & 1 deletion .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,8 @@ jobs:
with:
issue-number: ${{ github.event.issue.number }}
body: |
A new release has been made for this PR. You can install it with `npm i @apollo/client@${{ steps.get-version.outputs.version }}`.
A new release has been made for this PR. You can install it with:

```
npm i @apollo/client@${{ steps.get-version.outputs.version }}
```
4 changes: 2 additions & 2 deletions .size-limits.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dist/apollo-client.min.cjs": 39211,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32584
"dist/apollo-client.min.cjs": 39247,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32630
}
4 changes: 4 additions & 0 deletions docs/source/performance/optimistic-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ As this example shows, the value of `optimisticResponse` is an object that match

5. Apollo Client notifies all affected queries again. The associated components re-render, but if the server's response matches our `optimisticResponse`, this is invisible to the user.

<MinVersion version="3.9.0">

## Bailing out of an optimistic update

</MinVersion>

In some cases you may want to skip an optimistic update. For example, you may want to perform an optimistic update _only_ when certain variables are passed to the mutation. To skip an update, pass a function to the `optimisticResponse` option and return the `IGNORE` sentinel object available on the second argument to bail out of the optimistic update.

Consider this example:
Expand Down
Loading
Loading