Chloe e3f564ca77
feat: first step of adding core charge functionality
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
2024-04-24 16:38:08 +07:00

77 lines
1.3 KiB
TypeScript

import imageFragment from './image';
import seoFragment from './seo';
const productFragment = /* GraphQL */ `
fragment product on Product {
id
handle
availableForSale
title
description
descriptionHtml
options {
id
name
values
}
priceRange {
maxVariantPrice {
amount
currencyCode
}
minVariantPrice {
amount
currencyCode
}
}
collections(first: 1) {
nodes {
title
handle
}
}
variants(first: 250) {
edges {
node {
id
title
availableForSale
selectedOptions {
name
value
}
price {
amount
currencyCode
}
coreCharge: metafield(namespace: "custom", key: "core_charge") {
value
}
waiverAvailable: metafield(namespace: "custom", key: "waiver_available") {
value
}
}
}
}
featuredImage {
...image
}
images(first: 20) {
edges {
node {
...image
}
}
}
seo {
...seo
}
tags
updatedAt
}
${imageFragment}
${seoFragment}
`;
export default productFragment;