import {GET_POSTS} from "@graphql/queries/standalone/blog"; import type {IPostResponse} from '@types'; export function usePosts() { const { data, error } = useAsyncQuery(GET_POSTS); const posts = computed(() => data.value?.posts.edges ?? []); watch(error, (err) => { if (err) { console.error('usePosts error:', err); } }); return { posts, }; }