Files
commerce/framework/vendure/utils/queries/get-product-query.ts
2021-09-30 15:52:18 +07:00

57 lines
889 B
TypeScript

export const getProductQuery = /* GraphQL */ `
query getProduct($slug: String!) {
product(slug: $slug) {
id
name
slug
description
assets {
id
preview
name
}
variants {
id
priceWithTax
currencyCode
options {
id
name
code
groupId
group {
id
options {
name
}
}
}
}
optionGroups {
id
code
name
options {
id
name
}
}
}
}
`
export const getProductDetailQuery = /* GraphQL */ `
query GetProductDetail($slug: String! = "hand-trowel") {
product(slug: $slug) {
name
description
variants {
price
priceWithTax
}
assets {
preview
name
}
}
}
`