From d64b0c42818f817836ea68f37da64eb9587f2152 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Sun, 16 Feb 2020 19:02:03 +0100 Subject: [PATCH] fix: use getCurrentResult() --- packages/vue-apollo-composable/src/useQuery.ts | 4 ++-- packages/vue-apollo-option/src/smart-query.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/vue-apollo-composable/src/useQuery.ts b/packages/vue-apollo-composable/src/useQuery.ts index 2a56917..85d4063 100644 --- a/packages/vue-apollo-composable/src/useQuery.ts +++ b/packages/vue-apollo-composable/src/useQuery.ts @@ -168,7 +168,7 @@ export function useQuery< startQuerySubscription() if (!isServer && (currentOptions.value.fetchPolicy !== 'no-cache' || currentOptions.value.notifyOnNetworkStatusChange)) { - const currentResult = query.value.currentResult() + const currentResult = query.value.getCurrentResult() if (!currentResult.loading || currentOptions.value.notifyOnNetworkStatusChange) { onNextResult(currentResult as ApolloQueryResult) @@ -222,7 +222,7 @@ export function useQuery< } function onError (queryError: any) { - processNextResult(query.value.currentResult() as ApolloQueryResult) + processNextResult(query.value.getCurrentResult() as ApolloQueryResult) processError(queryError) if (firstReject) { firstReject(queryError) diff --git a/packages/vue-apollo-option/src/smart-query.js b/packages/vue-apollo-option/src/smart-query.js index ce8afce..7f61f17 100644 --- a/packages/vue-apollo-option/src/smart-query.js +++ b/packages/vue-apollo-option/src/smart-query.js @@ -128,7 +128,7 @@ export default class SmartQuery extends SmartApollo { } maySetLoading (force = false) { - const currentResult = this.observer.currentResult() + const currentResult = this.observer.getCurrentResult() if (force || currentResult.loading) { if (!this.loading) { this.applyLoadingModifier(1) @@ -199,7 +199,7 @@ export default class SmartQuery extends SmartApollo { super.catchError(error) this.firstRunReject() this.loadingDone(error) - this.nextResult(this.observer.currentResult()) + this.nextResult(this.observer.getCurrentResult()) // The observable closes the sub if an error occurs this.resubscribeToQuery() }