mirror of
https://github.com/vuejs/apollo.git
synced 2026-02-01 14:37:18 +00:00
refactor: variablesRef is now always a Ref
This commit is contained in:
parent
bec8252295
commit
139b2158cf
@ -29,7 +29,7 @@ export function useQuery<
|
||||
if (variables == null) variables = ref()
|
||||
if (options == null) options = {}
|
||||
const documentRef = paramToRef(document)
|
||||
const variablesRef = paramToReactive(variables)
|
||||
const variablesRef = paramToRef(variables)
|
||||
const optionsRef = paramToReactive(options)
|
||||
|
||||
// Result
|
||||
@ -141,7 +141,7 @@ export function useQuery<
|
||||
|
||||
// Applying variables
|
||||
let currentVariables: TVariables
|
||||
watch(() => isRef(variablesRef) ? variablesRef.value : variablesRef, value => {
|
||||
watch(variablesRef, value => {
|
||||
currentVariables = value
|
||||
restart()
|
||||
}, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user