fix: use shallowRef for apollo query

This commit is contained in:
Guillaume Chau
2023-11-29 14:37:33 +01:00
parent 21fca98911
commit 76f19f6e0c
@@ -8,6 +8,7 @@ import {
getCurrentInstance,
onBeforeUnmount,
nextTick,
shallowRef,
} from 'vue-demi'
import { DocumentNode } from 'graphql'
import type {
@@ -218,7 +219,7 @@ export function useQueryImpl<
// Query
const query: Ref<ObservableQuery<TResult, TVariables> | null | undefined> = ref()
const query: Ref<ObservableQuery<TResult, TVariables> | null | undefined> = shallowRef()
let observer: ObservableSubscription | undefined
let started = false
let ignoreNextResult = false