mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
49 lines
788 B
TypeScript
49 lines
788 B
TypeScript
const getProductQuery = /* GraphQL */ `
|
|
query getProductBySlug($slug: ID!) {
|
|
product(id: $slug, idType: SLUG) {
|
|
id
|
|
name
|
|
sku
|
|
galleryImages {
|
|
edges {
|
|
node {
|
|
id
|
|
srcSet
|
|
title
|
|
sourceUrl
|
|
mediaItemUrl
|
|
altText
|
|
sizes
|
|
}
|
|
}
|
|
}
|
|
image {
|
|
id
|
|
srcSet
|
|
title
|
|
sourceUrl
|
|
mediaItemUrl
|
|
altText
|
|
sizes
|
|
}
|
|
description
|
|
link
|
|
shortDescription
|
|
slug
|
|
... on SimpleProduct {
|
|
id
|
|
name
|
|
price
|
|
content
|
|
uri
|
|
slug
|
|
shortDescription
|
|
regularPrice
|
|
salePrice
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export default getProductQuery
|