mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
44
framework/vendure/utils/fragments/cart-fragment.ts
Normal file
44
framework/vendure/utils/fragments/cart-fragment.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
export const cartFragment = /* GraphQL */ `
|
||||
fragment Cart on Order {
|
||||
id
|
||||
code
|
||||
createdAt
|
||||
totalQuantity
|
||||
subTotal
|
||||
subTotalWithTax
|
||||
total
|
||||
totalWithTax
|
||||
currencyCode
|
||||
customer {
|
||||
id
|
||||
}
|
||||
lines {
|
||||
id
|
||||
quantity
|
||||
linePriceWithTax
|
||||
discountedLinePriceWithTax
|
||||
unitPriceWithTax
|
||||
discountedUnitPriceWithTax
|
||||
featuredAsset {
|
||||
id
|
||||
preview
|
||||
}
|
||||
discounts {
|
||||
description
|
||||
amount
|
||||
}
|
||||
productVariant {
|
||||
id
|
||||
name
|
||||
sku
|
||||
price
|
||||
priceWithTax
|
||||
stockLevel
|
||||
product {
|
||||
slug
|
||||
}
|
||||
productId
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
24
framework/vendure/utils/fragments/search-result-fragment.ts
Normal file
24
framework/vendure/utils/fragments/search-result-fragment.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
export const searchResultFragment = /* GraphQL */ `
|
||||
fragment SearchResult on SearchResult {
|
||||
productId
|
||||
productName
|
||||
description
|
||||
description
|
||||
slug
|
||||
sku
|
||||
currencyCode
|
||||
productAsset {
|
||||
id
|
||||
preview
|
||||
}
|
||||
priceWithTax {
|
||||
... on SinglePrice {
|
||||
value
|
||||
}
|
||||
... on PriceRange {
|
||||
min
|
||||
max
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
Reference in New Issue
Block a user