layouts-apifixed
This commit is contained in:
commit
a69ce90f2d
|
@ -2,7 +2,7 @@ import styles from './DialogCard.module.scss'
|
|||
import DialogAvatar from './DialogAvatar'
|
||||
import type { Author, AuthResult } from '../../graphql/types.gen'
|
||||
import { useSession } from '../../context/session'
|
||||
import { createMemo, InitializedResource } from 'solid-js'
|
||||
import { createMemo } from 'solid-js'
|
||||
import { apiClient } from '../../utils/apiClient'
|
||||
|
||||
type DialogProps = {
|
||||
|
@ -22,11 +22,11 @@ const DialogCard = (props: DialogProps) => {
|
|||
|
||||
const handleOpenChat = async () => {
|
||||
try {
|
||||
const test = await apiClient.createChat({
|
||||
const initChat = await apiClient.createChat({
|
||||
title: 'test chat',
|
||||
members: [props.author.slug, currentSession().user.slug]
|
||||
})
|
||||
console.log('!!! test:', test)
|
||||
// console.log('!!! test:', test)
|
||||
} catch (error) {
|
||||
console.log('!!! errr:', error)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export const ForgotPasswordForm = () => {
|
|||
setValidationErrors(({ email: _notNeeded, ...rest }) => rest)
|
||||
setEmail(newEmail)
|
||||
}
|
||||
const [sended, setSended] = createSignal(false)
|
||||
|
||||
const [submitError, setSubmitError] = createSignal('')
|
||||
const [isSubmitting, setIsSubmitting] = createSignal(false)
|
||||
const [validationErrors, setValidationErrors] = createSignal<ValidationErrors>({})
|
||||
|
@ -69,12 +69,7 @@ export const ForgotPasswordForm = () => {
|
|||
return (
|
||||
<form onSubmit={handleSubmit}>
|
||||
<h4>{t('Forgot password?')}</h4>
|
||||
<Show
|
||||
when={!sended()}
|
||||
fallback={<div class={styles.authInfo}>{t('Link sent, check your email')}</div>}
|
||||
>
|
||||
<div class={styles.authSubtitle}>{t('Everything is ok, please give us your email address')}</div>
|
||||
</Show>
|
||||
<div class={styles.authSubtitle}>{t('Everything is ok, please give us your email address')}</div>
|
||||
<Show when={submitError()}>
|
||||
<div class={styles.authInfo}>
|
||||
<ul>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { clsx } from 'clsx'
|
|||
import { handleClientRouteLinkClick, useRouter } from '../../stores/router'
|
||||
import { t } from '../../utils/intl'
|
||||
import { Icon } from '../_shared/Icon'
|
||||
import { createSignal, onMount, Show } from 'solid-js'
|
||||
import { createSignal, Show } from 'solid-js'
|
||||
import Notifications from './Notifications'
|
||||
import { ProfilePopup } from './ProfilePopup'
|
||||
import Userpic from '../Author/Userpic'
|
||||
|
|
|
@ -18,6 +18,7 @@ export const ProfileModal = () => {
|
|||
|
||||
const author = createMemo<Author>(() => {
|
||||
const a: Author = {
|
||||
id: null,
|
||||
name: 'anonymous',
|
||||
userpic: '',
|
||||
slug: ''
|
||||
|
|
|
@ -13,6 +13,7 @@ import '../../styles/Inbox.scss'
|
|||
import { createClient } from '@urql/core'
|
||||
import { findAndLoadGraphQLConfig } from '@graphql-codegen/cli'
|
||||
// import { useAuthStore } from '../../stores/auth'
|
||||
import { useSession } from '../../context/session'
|
||||
|
||||
const OWNER_ID = '501'
|
||||
const client = createClient({
|
||||
|
@ -66,11 +67,15 @@ export const InboxView = () => {
|
|||
const [authors, setAuthors] = createSignal<Author[]>([])
|
||||
const [postMessageText, setPostMessageText] = createSignal('')
|
||||
const [loading, setLoading] = createSignal<boolean>(false)
|
||||
const [currentSlug, setCurrentSlug] = createSignal<Author['slug'] | null>()
|
||||
|
||||
const { session } = useSession()
|
||||
const { sortedAuthors } = useAuthorsStore()
|
||||
|
||||
createEffect(() => {
|
||||
setAuthors(sortedAuthors())
|
||||
console.log('!!! session():', session())
|
||||
setCurrentSlug(session()?.user?.slug)
|
||||
})
|
||||
|
||||
// Поиск по диалогам
|
||||
|
@ -97,30 +102,31 @@ export const InboxView = () => {
|
|||
let chatWindow
|
||||
onMount(async () => {
|
||||
setLoading(true)
|
||||
await fetchMessages(messageQuery)
|
||||
.then(() => {
|
||||
setLoading(false)
|
||||
chatWindow.scrollTop = chatWindow.scrollHeight
|
||||
})
|
||||
.catch(() => setLoading(false))
|
||||
try {
|
||||
await fetchMessages(messageQuery)
|
||||
} catch (error) {
|
||||
setLoading(false)
|
||||
console.error([fetchMessages], error)
|
||||
} finally {
|
||||
setLoading(false)
|
||||
chatWindow.scrollTop = chatWindow.scrollHeight
|
||||
}
|
||||
})
|
||||
|
||||
const handleSubmit = async () => {
|
||||
postMessage(postMessageText())
|
||||
.then((result) => {
|
||||
setMessages((prev) => [...prev, result])
|
||||
})
|
||||
.then(() => {
|
||||
setPostMessageText('')
|
||||
chatWindow.scrollTop = chatWindow.scrollHeight
|
||||
})
|
||||
.catch(console.error)
|
||||
try {
|
||||
const post = await postMessage(postMessageText())
|
||||
setMessages((prev) => [...prev, post])
|
||||
setPostMessageText('')
|
||||
chatWindow.scrollTop = chatWindow.scrollHeight
|
||||
} catch (error) {
|
||||
console.error('[post message error]:', error)
|
||||
}
|
||||
}
|
||||
const handleChangeMessage = (event) => {
|
||||
setPostMessageText(event.target.value)
|
||||
}
|
||||
|
||||
// TODO: get user session
|
||||
return (
|
||||
<div class="messages container">
|
||||
<div class="row">
|
||||
|
|
|
@ -24,18 +24,42 @@ export type AuthResult = {
|
|||
export type Author = {
|
||||
bio?: Maybe<Scalars['String']>
|
||||
caption?: Maybe<Scalars['String']>
|
||||
id: Scalars['Int']
|
||||
lastSeen?: Maybe<Scalars['DateTime']>
|
||||
links?: Maybe<Array<Maybe<Scalars['String']>>>
|
||||
name: Scalars['String']
|
||||
roles?: Maybe<Array<Maybe<Role>>>
|
||||
slug: Scalars['String']
|
||||
stat?: Maybe<AuthorStat>
|
||||
userpic?: Maybe<Scalars['String']>
|
||||
}
|
||||
|
||||
export type AuthorStat = {
|
||||
commented?: Maybe<Scalars['Int']>
|
||||
followers?: Maybe<Scalars['Int']>
|
||||
followings?: Maybe<Scalars['Int']>
|
||||
rating?: Maybe<Scalars['Int']>
|
||||
}
|
||||
|
||||
export type AuthorsBy = {
|
||||
createdAt?: InputMaybe<Scalars['DateTime']>
|
||||
days?: InputMaybe<Scalars['Int']>
|
||||
lastSeen?: InputMaybe<Scalars['DateTime']>
|
||||
name?: InputMaybe<Scalars['String']>
|
||||
order?: InputMaybe<Scalars['String']>
|
||||
slug?: InputMaybe<Scalars['String']>
|
||||
stat?: InputMaybe<Scalars['String']>
|
||||
topic?: InputMaybe<Scalars['String']>
|
||||
}
|
||||
|
||||
export type Chat = {
|
||||
admins?: Maybe<Array<Maybe<User>>>
|
||||
createdAt: Scalars['Int']
|
||||
createdBy: User
|
||||
description?: Maybe<Scalars['String']>
|
||||
id: Scalars['Int']
|
||||
id: Scalars['String']
|
||||
messages: Array<Maybe<Message>>
|
||||
private?: Maybe<Scalars['Boolean']>
|
||||
title?: Maybe<Scalars['String']>
|
||||
unread?: Maybe<Scalars['Int']>
|
||||
updatedAt: Scalars['Int']
|
||||
|
@ -52,8 +76,8 @@ export type ChatMember = {
|
|||
invitedAt?: Maybe<Scalars['DateTime']>
|
||||
invitedBy?: Maybe<Scalars['String']>
|
||||
name: Scalars['String']
|
||||
pic?: Maybe<Scalars['String']>
|
||||
slug: Scalars['String']
|
||||
userpic?: Maybe<Scalars['String']>
|
||||
}
|
||||
|
||||
export type Collab = {
|
||||
|
@ -69,6 +93,7 @@ export type Collection = {
|
|||
createdAt: Scalars['DateTime']
|
||||
createdBy: User
|
||||
desc?: Maybe<Scalars['String']>
|
||||
id: Scalars['Int']
|
||||
publishedAt?: Maybe<Scalars['DateTime']>
|
||||
slug: Scalars['String']
|
||||
title: Scalars['String']
|
||||
|
@ -78,6 +103,7 @@ export type Community = {
|
|||
createdAt: Scalars['DateTime']
|
||||
createdBy: User
|
||||
desc?: Maybe<Scalars['String']>
|
||||
id: Scalars['Int']
|
||||
name: Scalars['String']
|
||||
pic: Scalars['String']
|
||||
slug: Scalars['String']
|
||||
|
@ -96,7 +122,7 @@ export type Message = {
|
|||
chatId: Scalars['String']
|
||||
createdAt: Scalars['Int']
|
||||
id: Scalars['Int']
|
||||
replyTo?: Maybe<Scalars['Int']>
|
||||
replyTo?: Maybe<Scalars['String']>
|
||||
updatedAt?: Maybe<Scalars['Int']>
|
||||
}
|
||||
|
||||
|
@ -122,8 +148,7 @@ export type Mutation = {
|
|||
createReaction: Result
|
||||
createShout: Result
|
||||
createTopic: Result
|
||||
deleteCollection: Result
|
||||
deleteCommunity: Result
|
||||
deleteChat: Result
|
||||
deleteMessage: Result
|
||||
deleteReaction: Result
|
||||
deleteShout: Result
|
||||
|
@ -159,7 +184,7 @@ export type MutationCreateChatArgs = {
|
|||
export type MutationCreateMessageArgs = {
|
||||
body: Scalars['String']
|
||||
chatId: Scalars['String']
|
||||
replyTo?: InputMaybe<Scalars['Int']>
|
||||
replyTo?: InputMaybe<Scalars['String']>
|
||||
}
|
||||
|
||||
export type MutationCreateReactionArgs = {
|
||||
|
@ -174,12 +199,8 @@ export type MutationCreateTopicArgs = {
|
|||
input: TopicInput
|
||||
}
|
||||
|
||||
export type MutationDeleteCollectionArgs = {
|
||||
slug: Scalars['String']
|
||||
}
|
||||
|
||||
export type MutationDeleteCommunityArgs = {
|
||||
slug: Scalars['String']
|
||||
export type MutationDeleteChatArgs = {
|
||||
chatId: Scalars['String']
|
||||
}
|
||||
|
||||
export type MutationDeleteMessageArgs = {
|
||||
|
@ -295,58 +316,34 @@ export type ProfileInput = {
|
|||
}
|
||||
|
||||
export type Query = {
|
||||
authorsAll: Array<Maybe<User>>
|
||||
collectionsAll: Array<Maybe<Collection>>
|
||||
authorsAll: Array<Maybe<Author>>
|
||||
getAuthor: User
|
||||
getCollabs: Array<Maybe<Collab>>
|
||||
getCommunities: Array<Maybe<Community>>
|
||||
getCommunity: Community
|
||||
getShoutBySlug: Shout
|
||||
getUserCollections: Array<Maybe<Collection>>
|
||||
getUserRoles: Array<Maybe<Role>>
|
||||
getUsersBySlugs: Array<Maybe<User>>
|
||||
getTopic: Topic
|
||||
isEmailUsed: Scalars['Boolean']
|
||||
loadChat: Array<Maybe<Message>>
|
||||
loadAuthorsBy: Array<Maybe<Author>>
|
||||
loadChats: Result
|
||||
loadMessagesBy: Result
|
||||
loadReactionsBy: Array<Maybe<Reaction>>
|
||||
loadShoutsBy: Array<Maybe<Shout>>
|
||||
markdownBody: Scalars['String']
|
||||
myChats: Array<Maybe<Chat>>
|
||||
reactionsByAuthor: Array<Maybe<Reaction>>
|
||||
reactionsForShouts: Array<Maybe<Reaction>>
|
||||
recentAll: Array<Maybe<Shout>>
|
||||
recentCandidates: Array<Maybe<Shout>>
|
||||
recentCommented: Array<Maybe<Shout>>
|
||||
recentPublished: Array<Maybe<Shout>>
|
||||
recentReacted: Array<Maybe<Shout>>
|
||||
searchQuery?: Maybe<Array<Maybe<Shout>>>
|
||||
shoutsByAuthors: Array<Maybe<Shout>>
|
||||
shoutsByCollection: Array<Maybe<Shout>>
|
||||
shoutsByCommunities: Array<Maybe<Shout>>
|
||||
shoutsByTopics: Array<Maybe<Shout>>
|
||||
shoutsForFeed: Array<Maybe<Shout>>
|
||||
searchUsers: Result
|
||||
signIn: AuthResult
|
||||
signOut: AuthResult
|
||||
topicsAll: Array<Maybe<Topic>>
|
||||
topicsByAuthor: Array<Maybe<Topic>>
|
||||
topicsByCommunity: Array<Maybe<Topic>>
|
||||
topicsRandom: Array<Maybe<Topic>>
|
||||
userFollowedAuthors: Array<Maybe<User>>
|
||||
userFollowedCommunities: Array<Maybe<Community>>
|
||||
userFollowedAuthors: Array<Maybe<Author>>
|
||||
userFollowedTopics: Array<Maybe<Topic>>
|
||||
userFollowers: Array<Maybe<User>>
|
||||
userReactedShouts: Array<Maybe<Shout>>
|
||||
userFollowers: Array<Maybe<Author>>
|
||||
}
|
||||
|
||||
export type QueryGetCommunityArgs = {
|
||||
slug?: InputMaybe<Scalars['String']>
|
||||
}
|
||||
|
||||
export type QueryGetShoutBySlugArgs = {
|
||||
export type QueryGetAuthorArgs = {
|
||||
slug: Scalars['String']
|
||||
}
|
||||
|
||||
export type QueryGetUserCollectionsArgs = {
|
||||
author: Scalars['String']
|
||||
}
|
||||
|
||||
export type QueryGetUserRolesArgs = {
|
||||
export type QueryGetTopicArgs = {
|
||||
slug: Scalars['String']
|
||||
}
|
||||
|
||||
|
@ -354,7 +351,30 @@ export type QueryIsEmailUsedArgs = {
|
|||
email: Scalars['String']
|
||||
}
|
||||
|
||||
export type QueryLoadChatArgs = {
|
||||
export type QueryLoadAuthorsByArgs = {
|
||||
amount?: InputMaybe<Scalars['Int']>
|
||||
by?: InputMaybe<AuthorsBy>
|
||||
offset?: InputMaybe<Scalars['Int']>
|
||||
}
|
||||
|
||||
export type QueryLoadChatsArgs = {
|
||||
amount?: InputMaybe<Scalars['Int']>
|
||||
offset?: InputMaybe<Scalars['Int']>
|
||||
}
|
||||
|
||||
export type QueryLoadMessagesByArgs = {
|
||||
amount?: InputMaybe<Scalars['Int']>
|
||||
by: MessagesBy
|
||||
offset?: InputMaybe<Scalars['Int']>
|
||||
}
|
||||
|
||||
export type QueryLoadReactionsByArgs = {
|
||||
amount?: InputMaybe<Scalars['Int']>
|
||||
by: ReactionBy
|
||||
limit?: InputMaybe<Scalars['Int']>
|
||||
}
|
||||
|
||||
export type QueryLoadShoutsByArgs = {
|
||||
amount?: InputMaybe<Scalars['Int']>
|
||||
by?: InputMaybe<ShoutsBy>
|
||||
offset?: InputMaybe<Scalars['Int']>
|
||||
|
@ -364,76 +384,10 @@ export type QueryMarkdownBodyArgs = {
|
|||
body: Scalars['String']
|
||||
}
|
||||
|
||||
export type QueryReactionsByAuthorArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
slug: Scalars['String']
|
||||
}
|
||||
|
||||
export type QueryReactionsForShoutsArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
shouts: Array<InputMaybe<Scalars['String']>>
|
||||
}
|
||||
|
||||
export type QueryRecentAllArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
}
|
||||
|
||||
export type QueryRecentCandidatesArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
}
|
||||
|
||||
export type QueryRecentCommentedArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
}
|
||||
|
||||
export type QueryRecentPublishedArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
}
|
||||
|
||||
export type QueryRecentReactedArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
}
|
||||
|
||||
export type QuerySearchQueryArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
q?: InputMaybe<Scalars['String']>
|
||||
}
|
||||
|
||||
export type QueryShoutsByAuthorsArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
slugs: Array<InputMaybe<Scalars['String']>>
|
||||
}
|
||||
|
||||
export type QueryShoutsByCollectionArgs = {
|
||||
collection: Scalars['String']
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
}
|
||||
|
||||
export type QueryShoutsByCommunitiesArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
slugs: Array<InputMaybe<Scalars['String']>>
|
||||
}
|
||||
|
||||
export type QueryShoutsByTopicsArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
slugs: Array<InputMaybe<Scalars['String']>>
|
||||
}
|
||||
|
||||
export type QueryShoutsForFeedArgs = {
|
||||
limit: Scalars['Int']
|
||||
offset: Scalars['Int']
|
||||
export type QuerySearchUsersArgs = {
|
||||
amount?: InputMaybe<Scalars['Int']>
|
||||
offset?: InputMaybe<Scalars['Int']>
|
||||
query: Scalars['String']
|
||||
}
|
||||
|
||||
export type QuerySignInArgs = {
|
||||
|
@ -494,7 +448,6 @@ export type ReactionBy = {
|
|||
days?: InputMaybe<Scalars['Int']>
|
||||
order?: InputMaybe<Scalars['String']>
|
||||
shout?: InputMaybe<Scalars['String']>
|
||||
shouts?: InputMaybe<Array<InputMaybe<Scalars['String']>>>
|
||||
stat?: InputMaybe<Scalars['String']>
|
||||
topic?: InputMaybe<Scalars['String']>
|
||||
}
|
||||
|
@ -542,8 +495,8 @@ export type Resource = {
|
|||
}
|
||||
|
||||
export type Result = {
|
||||
author?: Maybe<User>
|
||||
authors?: Maybe<Array<Maybe<User>>>
|
||||
author?: Maybe<Author>
|
||||
authors?: Maybe<Array<Maybe<Author>>>
|
||||
chat?: Maybe<Chat>
|
||||
chats?: Maybe<Array<Maybe<Chat>>>
|
||||
communities?: Maybe<Array<Maybe<Community>>>
|
||||
|
@ -556,8 +509,10 @@ export type Result = {
|
|||
reactions?: Maybe<Array<Maybe<Reaction>>>
|
||||
shout?: Maybe<Shout>
|
||||
shouts?: Maybe<Array<Maybe<Shout>>>
|
||||
slugs?: Maybe<Array<Maybe<Scalars['String']>>>
|
||||
topic?: Maybe<Topic>
|
||||
topics?: Maybe<Array<Maybe<Topic>>>
|
||||
uids?: Maybe<Array<Maybe<Scalars['String']>>>
|
||||
}
|
||||
|
||||
export type Role = {
|
||||
|
@ -576,7 +531,6 @@ export type Shout = {
|
|||
createdAt: Scalars['DateTime']
|
||||
deletedAt?: Maybe<Scalars['DateTime']>
|
||||
deletedBy?: Maybe<User>
|
||||
draft?: Maybe<Scalars['Boolean']>
|
||||
id: Scalars['Int']
|
||||
lang?: Maybe<Scalars['String']>
|
||||
layout?: Maybe<Scalars['String']>
|
||||
|
@ -591,8 +545,8 @@ export type Shout = {
|
|||
topics?: Maybe<Array<Maybe<Topic>>>
|
||||
updatedAt?: Maybe<Scalars['DateTime']>
|
||||
updatedBy?: Maybe<User>
|
||||
versionOf?: Maybe<Shout>
|
||||
visibleFor?: Maybe<Array<Maybe<User>>>
|
||||
versionOf?: Maybe<Scalars['String']>
|
||||
visibility?: Maybe<Scalars['String']>
|
||||
}
|
||||
|
||||
export type ShoutInput = {
|
||||
|
@ -614,12 +568,10 @@ export type ShoutsBy = {
|
|||
days?: InputMaybe<Scalars['Int']>
|
||||
layout?: InputMaybe<Scalars['String']>
|
||||
order?: InputMaybe<Scalars['String']>
|
||||
published?: InputMaybe<Scalars['Boolean']>
|
||||
slug?: InputMaybe<Scalars['String']>
|
||||
stat?: InputMaybe<Scalars['String']>
|
||||
title?: InputMaybe<Scalars['String']>
|
||||
topic?: InputMaybe<Scalars['String']>
|
||||
topics?: InputMaybe<Array<InputMaybe<Scalars['String']>>>
|
||||
visibility?: InputMaybe<Scalars['String']>
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
import type {
|
||||
Reaction,
|
||||
Shout,
|
||||
FollowingEntity,
|
||||
AuthResult,
|
||||
ShoutInput,
|
||||
Topic,
|
||||
Author
|
||||
} from '../graphql/types.gen'
|
||||
import type { FollowingEntity, AuthResult, ShoutInput, Topic, Author } from '../graphql/types.gen'
|
||||
import { publicGraphQLClient } from '../graphql/publicGraphQLClient'
|
||||
import { getToken, privateGraphQLClient } from '../graphql/privateGraphQLClient'
|
||||
import topicsAll from '../graphql/query/topics-all'
|
||||
|
@ -26,14 +18,14 @@ import reactionDestroy from '../graphql/mutation/reaction-destroy'
|
|||
import reactionUpdate from '../graphql/mutation/reaction-update'
|
||||
import createArticle from '../graphql/mutation/article-create'
|
||||
import myChats from '../graphql/query/chats-load'
|
||||
import loadChat from '../graphql/query/chat-messages-load-by'
|
||||
import topicBySlug from '../graphql/query/topic-by-slug'
|
||||
import chatMessagesLoadBy from '../graphql/query/chat-messages-load-by'
|
||||
import authorBySlug from '../graphql/query/author-by-slug'
|
||||
import shoutsLoadBy from '../graphql/query/articles-load-by'
|
||||
import reactionsLoadBy from '../graphql/query/reactions-load-by'
|
||||
import authorsLoadBy from '../graphql/query/authors-load-by'
|
||||
import topicBySlug from '../graphql/query/topic-by-slug'
|
||||
import createChatQuery from '../graphql/mutation/create-chat'
|
||||
import reactionsLoadBy from '../graphql/query/reactions-load-by'
|
||||
import { REACTIONS_AMOUNT_PER_PAGE } from '../stores/zine/reactions'
|
||||
import authorsLoadBy from '../graphql/query/authors-load-by'
|
||||
import shoutsLoadBy from '../graphql/query/articles-load-by'
|
||||
|
||||
const FEED_SIZE = 50
|
||||
|
||||
|
@ -262,7 +254,7 @@ export const apiClient = {
|
|||
const by = {
|
||||
chat
|
||||
}
|
||||
const resp = await privateGraphQLClient.query(loadChat, { by, offset, amount }).toPromise()
|
||||
const resp = await privateGraphQLClient.query(chatMessagesLoadBy, { by, offset, amount }).toPromise()
|
||||
return resp.data.loadChat
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user