Skip to content

Commit

Permalink
Clarify active query limitation for refetchQueries (#11357)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopelluhh authored Nov 20, 2023
1 parent 60b7e56 commit bd4dd34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/data/mutations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ const [addTodo, { data, loading, error }] = useMutation(ADD_TODO, {
});
```

> You can only refetch _active_ queries. Active queries are those used by components on the current page. If the data you want to update is not fetched by a component on the current page, it's best to [update your cache directly](#updating-the-cache-directly).
Each element in the `refetchQueries` array is one of the following:

* A `DocumentNode` object parsed with the `gql` function
Expand Down

0 comments on commit bd4dd34

Please sign in to comment.