import { queryOptions } from '@tanstack/react-query'; import { getPost, getPosts } from '@/shared/api/_generated/api'; export const postQueries = { list: () => queryOptions({ queryKey: ['posts', 'list'] as const, queryFn: async () => getPosts(), staleTime: 1000 * 60, }), detail: (id: number) => queryOptions({ queryKey: ['posts', 'detail', id] as const, queryFn: async () => getPost(id), staleTime: 1000 * 60, }), };