import {GET_BRAND_BY_UUID} from "~/graphql/queries/standalone/brands"; import type {IBrandsResponse} from "~/types"; export async function useBrandByUuid(uuid: string) { const brand = computed(() => data.value?.brands.edges[0].node ?? []); const { data, error } = await useAsyncQuery( GET_BRAND_BY_UUID, { uuid } ); watch(error, (err) => { if (err) { console.error('useBrandsByUuid error:', err) } }); return { brand } }