mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Add Reaction Commerce provider
Signed-off-by: Loan Laux <loan@outgrow.io>
This commit is contained in:
181
framework/reactioncommerce/utils/queries/get-product-query.ts
Normal file
181
framework/reactioncommerce/utils/queries/get-product-query.ts
Normal file
@@ -0,0 +1,181 @@
|
||||
const getProductQuery = /* GraphQL */ `
|
||||
query getProductBySlug($slug: String!) {
|
||||
catalogItemProduct(slugOrId: $slug) {
|
||||
product {
|
||||
_id
|
||||
productId
|
||||
title
|
||||
slug
|
||||
description
|
||||
vendor
|
||||
isLowQuantity
|
||||
isSoldOut
|
||||
isBackorder
|
||||
metafields {
|
||||
description
|
||||
key
|
||||
namespace
|
||||
scope
|
||||
value
|
||||
valueType
|
||||
}
|
||||
pricing {
|
||||
currency {
|
||||
code
|
||||
}
|
||||
displayPrice
|
||||
minPrice
|
||||
maxPrice
|
||||
}
|
||||
shop {
|
||||
currency {
|
||||
code
|
||||
}
|
||||
}
|
||||
primaryImage {
|
||||
URLs {
|
||||
large
|
||||
medium
|
||||
original
|
||||
small
|
||||
thumbnail
|
||||
}
|
||||
priority
|
||||
productId
|
||||
variantId
|
||||
}
|
||||
media {
|
||||
priority
|
||||
productId
|
||||
variantId
|
||||
URLs {
|
||||
thumbnail
|
||||
small
|
||||
medium
|
||||
large
|
||||
original
|
||||
}
|
||||
}
|
||||
tags {
|
||||
nodes {
|
||||
name
|
||||
slug
|
||||
position
|
||||
}
|
||||
}
|
||||
variants {
|
||||
_id
|
||||
variantId
|
||||
attributeLabel
|
||||
title
|
||||
optionTitle
|
||||
index
|
||||
pricing {
|
||||
compareAtPrice {
|
||||
displayAmount
|
||||
}
|
||||
price
|
||||
currency {
|
||||
code
|
||||
}
|
||||
displayPrice
|
||||
}
|
||||
canBackorder
|
||||
inventoryAvailableToSell
|
||||
isBackorder
|
||||
isSoldOut
|
||||
isLowQuantity
|
||||
options {
|
||||
_id
|
||||
variantId
|
||||
attributeLabel
|
||||
title
|
||||
index
|
||||
pricing {
|
||||
compareAtPrice {
|
||||
displayAmount
|
||||
}
|
||||
price
|
||||
currency {
|
||||
code
|
||||
}
|
||||
displayPrice
|
||||
}
|
||||
optionTitle
|
||||
canBackorder
|
||||
inventoryAvailableToSell
|
||||
isBackorder
|
||||
isSoldOut
|
||||
isLowQuantity
|
||||
media {
|
||||
priority
|
||||
productId
|
||||
variantId
|
||||
URLs {
|
||||
thumbnail
|
||||
small
|
||||
medium
|
||||
large
|
||||
original
|
||||
}
|
||||
}
|
||||
metafields {
|
||||
description
|
||||
key
|
||||
namespace
|
||||
scope
|
||||
value
|
||||
valueType
|
||||
}
|
||||
primaryImage {
|
||||
URLs {
|
||||
large
|
||||
medium
|
||||
original
|
||||
small
|
||||
thumbnail
|
||||
}
|
||||
priority
|
||||
productId
|
||||
variantId
|
||||
}
|
||||
}
|
||||
media {
|
||||
priority
|
||||
productId
|
||||
variantId
|
||||
URLs {
|
||||
thumbnail
|
||||
small
|
||||
medium
|
||||
large
|
||||
original
|
||||
}
|
||||
}
|
||||
metafields {
|
||||
description
|
||||
key
|
||||
namespace
|
||||
scope
|
||||
value
|
||||
valueType
|
||||
}
|
||||
primaryImage {
|
||||
URLs {
|
||||
large
|
||||
medium
|
||||
original
|
||||
small
|
||||
thumbnail
|
||||
}
|
||||
priority
|
||||
productId
|
||||
variantId
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export default getProductQuery
|
Reference in New Issue
Block a user