Skip to content

Commit

Permalink
Merge pull request #440 from apollographql/main
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio authored Mar 13, 2024
2 parents 7731db9 + 765a94d commit 2d6e651
Show file tree
Hide file tree
Showing 11 changed files with 326 additions and 163 deletions.
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

0 comments on commit 2d6e651

Please sign in to comment.