schon/storefront/graphql/queries/standalone/brands.ts

40 lines
No EOL
676 B
TypeScript

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 (
$brandName: String
) {
brands(
name: $brandName
) {
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}
`