Skip to content

Commit

Permalink
Version Packages (alpha)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 15, 2023
1 parent ae7c765 commit fa89813
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dirty-kids-crash",
"forty-cups-shop",
"friendly-clouds-laugh",
"fuzzy-eyes-lick",
"hot-ducks-burn",
"polite-avocados-warn",
"quick-hats-marry",
Expand All @@ -20,8 +21,11 @@
"sixty-boxes-rest",
"sour-sheep-walk",
"strong-terms-perform",
"swift-zoos-collect",
"thick-mice-collect",
"thick-tips-cry",
"thirty-ties-arrive",
"unlucky-rats-decide",
"violet-lions-draw",
"wild-dolphins-jog",
"yellow-flies-repeat"
Expand Down
42 changes: 38 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# @apollo/client

## 3.9.0-alpha.6

### Minor Changes

- [#11397](https://github.com/apollographql/apollo-client/pull/11397) [`3f7eecb`](https://github.com/apollographql/apollo-client/commit/3f7eecbfbd4f4444cffcaac7dd9fd225c8c2a401) Thanks [@aditya-kumawat](https://github.com/aditya-kumawat)! - Adds a new `skipPollAttempt` callback function that's called whenever a refetch attempt occurs while polling. If the function returns `true`, the refetch is skipped and not reattempted until the next poll interval. This will solve the frequent use-case of disabling polling when the window is inactive.

```ts
useQuery(QUERY, {
pollInterval: 1000,
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
});
// or define it globally
new ApolloClient({
defaultOptions: {
watchQuery: {
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
},
},
});
```

### Patch Changes

- [#11220](https://github.com/apollographql/apollo-client/pull/11220) [`865659b`](https://github.com/apollographql/apollo-client/commit/865659b879dc1458812df6718fdeb72f211ad496) Thanks [@benjamn](https://github.com/benjamn)! - Update react-native.md - Adds react native devtool in the documentation

- [#11369](https://github.com/apollographql/apollo-client/pull/11369) [`2a47164`](https://github.com/apollographql/apollo-client/commit/2a471646616e3af1b5c039e961f8d5717fad8f32) Thanks [@phryneas](https://github.com/phryneas)! - Persisted Query Link: improve memory management

- use LRU `WeakCache` instead of `WeakMap` to keep a limited number of hash results
- hash cache is initiated lazily, only when needed
- expose `persistedLink.resetHashCache()` method
- reset hash cache if the upstream server reports it doesn't accept persisted queries

- [#10804](https://github.com/apollographql/apollo-client/pull/10804) [`221dd99`](https://github.com/apollographql/apollo-client/commit/221dd99ffd1990f8bd0392543af35e9b08d0fed8) Thanks [@phryneas](https://github.com/phryneas)! - use WeakMap in React Native with Hermes

## 3.9.0-alpha.5

### Minor Changes
Expand Down Expand Up @@ -95,7 +129,7 @@
import { Environment, Network, RecordSource, Store } from "relay-runtime";

const fetchMultipartSubs = createFetchMultipartSubscription(
"http://localhost:4000"
"http://localhost:4000",
);

const network = Network.create(fetchQuery, fetchMultipartSubs);
Expand Down Expand Up @@ -377,7 +411,7 @@
return data.breeds.map(({ characteristics }) =>
characteristics.map((characteristic) => (
<div key={characteristic}>{characteristic}</div>
))
)),
);
}
```
Expand Down Expand Up @@ -428,7 +462,7 @@

const { data } = useSuspenseQuery(
query,
id ? { variables: { id } } : skipToken
id ? { variables: { id } } : skipToken,
);
```

Expand Down Expand Up @@ -2383,7 +2417,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),
);
},
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apollo/client",
"version": "3.9.0-alpha.5",
"version": "3.9.0-alpha.6",
"description": "A fully-featured caching GraphQL client.",
"private": true,
"keywords": [
Expand Down

0 comments on commit fa89813

Please sign in to comment.