From 6db3cd48d59203769669ff97535a208dceb78635 Mon Sep 17 00:00:00 2001 From: Bill Min Date: Sat, 1 Jun 2024 10:49:15 -0400 Subject: [PATCH] fix: missing stale in subscription --- .../gql-query/components/gql-query-client/index.marko | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/node_modules/@internal/gql-query/components/gql-query-client/index.marko b/src/node_modules/@internal/gql-query/components/gql-query-client/index.marko index a6ecd95..5db015a 100644 --- a/src/node_modules/@internal/gql-query/components/gql-query-client/index.marko +++ b/src/node_modules/@internal/gql-query/components/gql-query-client/index.marko @@ -90,11 +90,15 @@ class { requestPolicy: this.input.requestPolicy, ...options, }), - subscribe(({ data, error }) => { + subscribe(({ data, error, stale }) => { this.stopTimeout(); this.state.data = data; this.state.error = error; - this.state.fetching = false; + if (stale) { + this.state.fetching = true; + } else { + this.state.fetching = false; + } }) ).unsubscribe; }