Feature/global update last timestamp use stale data while fetching (#473)

* Cache last update timestamp

* Correctly detect update as finished

The update status on server side does not get reset, thus, in case a previous update was finished, it would get detected as finished and handled once on the initial render.
This commit is contained in:
schroda
2023-11-25 15:35:36 +01:00
committed by GitHub
parent a4bd44de9e
commit 7c69a4a5a1
3 changed files with 27 additions and 20 deletions

View File

@@ -1987,15 +1987,7 @@ export class RequestManager {
public useGetLastGlobalUpdateTimestamp(
options?: QueryHookOptions<GetLastUpdateTimestampQuery, GetLastUpdateTimestampQueryVariables>,
): AbortableApolloUseQueryResponse<GetLastUpdateTimestampQuery, GetLastUpdateTimestampQueryVariables> {
return this.doRequest(
GQLMethod.USE_QUERY,
GET_LAST_UPDATE_TIMESTAMP,
{},
{
fetchPolicy: 'network-only',
...options,
},
);
return this.doRequest(GQLMethod.USE_QUERY, GET_LAST_UPDATE_TIMESTAMP, {}, options);
}
}