import gql from 'graphql-tag'
import {BRAND_FRAGMENT} from "@/graphql/fragments/brands.fragment.js";
import {CATEGORY_FRAGMENT} from "@/graphql/fragments/categories.fragment.js";

export const GET_BRANDS = gql`
  query getBrands {
    brands {
      edges {
        node {
          ...Brand
        }
      }
    }
  }
  ${BRAND_FRAGMENT}
`

export const GET_BRAND_BY_UUID = gql`
  query getBrandbyUuid(
    $uuid: String!
  ) {
    brands(
      uuid: $uuid
    ) {
      edges {
        node {
          ...Brand
          categories {
            ...Category
          }
        }
      }
    }
  }
  ${BRAND_FRAGMENT}
  ${CATEGORY_FRAGMENT}
`