From 29d722c5b410e5715398fb5fc689f99106bcb04b Mon Sep 17 00:00:00 2001 From: Nick Messing Date: Wed, 14 Aug 2024 16:45:34 +0300 Subject: [PATCH] docs(useQuery): document refetch with new variables (#1564) --- packages/docs/src/guide-composable/query.md | 57 +++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/packages/docs/src/guide-composable/query.md b/packages/docs/src/guide-composable/query.md index dcc59c0a..59f8c67f 100644 --- a/packages/docs/src/guide-composable/query.md +++ b/packages/docs/src/guide-composable/query.md @@ -700,6 +700,63 @@ export default { ``` +### Providing new variables to `refetch` + +You call `refetch` with a new set of variables like so: + +```vue{41} + + + +``` + +::: warning +If you provide new values for **some** of your original query's variables but not **all** of them, `refetch` uses each omitted variable's original value. +::: + ## Event hooks `useQuery` returns event hooks allowing you to execute code when a specific event occurs.