From 20a368fa6bb53d3ae6c5ad7379cbd5ff7f69fd83 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Wed, 23 Nov 2022 14:34:43 +0300 Subject: [PATCH] fixes --- src/graphql/query/articles-load.ts | 4 ++-- src/stores/inbox.ts | 2 +- src/utils/apiClient.ts | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/graphql/query/articles-load.ts b/src/graphql/query/articles-load.ts index 32c45179..276ef97e 100644 --- a/src/graphql/query/articles-load.ts +++ b/src/graphql/query/articles-load.ts @@ -32,8 +32,8 @@ export default gql` createdAt publishedAt stat { - # _id: viewed - # viewed + _id: viewed + viewed reacted rating } diff --git a/src/stores/inbox.ts b/src/stores/inbox.ts index 19e727da..f29b7c02 100644 --- a/src/stores/inbox.ts +++ b/src/stores/inbox.ts @@ -9,5 +9,5 @@ export const loadAuthorsBy = async (by?: any): Promise => { } export const loadChats = async (): Promise => { - return await apiClient.getChats({ limit: 0, offset: 50 }) + return await apiClient.getChats({ limit: 50, offset: 0 }) } diff --git a/src/utils/apiClient.ts b/src/utils/apiClient.ts index 49733097..f8403803 100644 --- a/src/utils/apiClient.ts +++ b/src/utils/apiClient.ts @@ -249,6 +249,7 @@ export const apiClient = { slug }) .toPromise() + if (resp.error) console.debug(resp) return resp.data.loadShout }, getShouts: async (options: LoadShoutsOptions) => { @@ -257,12 +258,12 @@ export const apiClient = { options }) .toPromise() - // console.debug(resp) + if (resp.error) console.debug(resp) return resp.data.loadShouts }, getReactionsBy: async ({ by, limit = REACTIONS_AMOUNT_PER_PAGE, offset = 0 }) => { const resp = await publicGraphQLClient.query(reactionsLoadBy, { by, limit, offset }).toPromise() - resp.error ?? console.error(resp.error) + console.error(resp) return resp.data.loadReactionsBy },