This commit is contained in:
tonyrewin 2022-11-23 14:34:43 +03:00
parent 6e37701420
commit 20a368fa6b
3 changed files with 6 additions and 5 deletions

View File

@ -32,8 +32,8 @@ export default gql`
createdAt
publishedAt
stat {
# _id: viewed
# viewed
_id: viewed
viewed
reacted
rating
}

View File

@ -9,5 +9,5 @@ export const loadAuthorsBy = async (by?: any): Promise<void> => {
}
export const loadChats = async (): Promise<void> => {
return await apiClient.getChats({ limit: 0, offset: 50 })
return await apiClient.getChats({ limit: 50, offset: 0 })
}

View File

@ -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
},