Skip to content

Commit

Permalink
Add a changeset for useQueryRefHandlers
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Dec 18, 2023
1 parent 7180415 commit 5a78004
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .changeset/dirty-tigers-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@apollo/client": minor
---

Create a new `useQueryRefHandlers` hook that returns `refetch` and `fetchMore` functions for a given `queryRef`. This is useful to get access to handlers for a `queryRef` that was created by `createQueryPreloader` or when the handlers for a `queryRef` produced by a different component are inaccessible.

```jsx
const MyComponent({ queryRef }) {
const { refetch, fetchMore } = useQueryRefHandlers(queryRef);

// ...
}
```

0 comments on commit 5a78004

Please sign in to comment.