Skip to content

Commit

Permalink
refactor: variablesRef is now always a Ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Nov 29, 2019
1 parent bec8252 commit 139b215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vue-apollo-composable/src/useQuery.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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()
}, {
Expand Down

0 comments on commit 139b215

Please sign in to comment.