import { createSignal } from 'solid-js' import type { Chat } from '../graphql/types.gen' import { apiClient } from '../utils/apiClient' export const [chats, setChats] = createSignal([]) export const loadAuthorsBy = async (by?: any): Promise => { return await apiClient.getAuthorsBy({ by }) } export const loadChats = async (): Promise => { return await apiClient.getChats({ limit: 0, offset: 50 }) }