import {GET_BRANDS} from "~/graphql/queries/standalone/brands"; import type {IBrandsResponse} from "~/types"; export function useBrands() { const { data, error } = useAsyncQuery( GET_BRANDS ); const brands = computed(() => data.value?.brands.edges ?? []); watch(error, (err) => { if (err) { console.error('useBrands error:', err) } }); return { brands } }