mirror of
https://github.com/vercel/commerce.git
synced 2025-07-30 05:31:22 +00:00
.vscode
assets
components
config
docs
framework
bigcommerce
commerce
shopify
api
auth
cart
common
customer
product
utils
mutations
queries
get-all-collections-query.ts
get-all-pages-query.ts
get-all-product-vendors-query.ts
get-all-products-paths-query.ts
get-all-products-query.ts
get-checkout-query.ts
get-collection-products-query.ts
get-customer-id-query.ts
get-customer-query.ts
get-page-query.ts
get-product-query.ts
index.ts
customer-token.ts
get-categories.ts
get-checkout-id.ts
get-search-variables.ts
get-sort-variables.ts
get-vendors.ts
handle-fetch-response.ts
handle-login.ts
index.ts
normalize.ts
storage.ts
wishlist
.env.template
README.md
commerce.config.json
const.ts
fetcher.ts
index.tsx
next.config.js
provider.ts
schema.d.ts
schema.graphql
types.ts
lib
pages
public
.editorconfig
.env.template
.gitignore
.prettierignore
.prettierrc
README.md
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
63 lines
968 B
TypeScript
63 lines
968 B
TypeScript
export const checkoutDetailsFragment = `
|
|
id
|
|
webUrl
|
|
subtotalPriceV2{
|
|
amount
|
|
currencyCode
|
|
}
|
|
totalTaxV2 {
|
|
amount
|
|
currencyCode
|
|
}
|
|
totalPriceV2 {
|
|
amount
|
|
currencyCode
|
|
}
|
|
completedAt
|
|
createdAt
|
|
taxesIncluded
|
|
lineItems(first: 250) {
|
|
pageInfo {
|
|
hasNextPage
|
|
hasPreviousPage
|
|
}
|
|
edges {
|
|
node {
|
|
id
|
|
title
|
|
variant {
|
|
id
|
|
sku
|
|
title
|
|
image {
|
|
originalSrc
|
|
altText
|
|
width
|
|
height
|
|
}
|
|
priceV2{
|
|
amount
|
|
currencyCode
|
|
}
|
|
compareAtPriceV2{
|
|
amount
|
|
currencyCode
|
|
}
|
|
}
|
|
quantity
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
const getCheckoutQuery = /* GraphQL */ `
|
|
query($checkoutId: ID!) {
|
|
node(id: $checkoutId) {
|
|
... on Checkout {
|
|
${checkoutDetailsFragment}
|
|
}
|
|
}
|
|
}
|
|
`
|
|
export default getCheckoutQuery
|