saleor: initial cart integration

This commit is contained in:
Zaiste
2021-04-26 16:24:50 +02:00
parent ef10084e54
commit 19445747f1
9 changed files with 41 additions and 76 deletions

View File

@@ -2,16 +2,19 @@ import { checkoutDetailsFragment } from '../queries/get-checkout-query'
const checkoutCreateMutation = /* GraphQL */ `
mutation createCheckout {
checkoutCreate(input: {}) {
checkoutUserErrors {
checkoutCreate(input: {
email: "customer@example.com",
lines: [{quantity: 1, variantId: "UHJvZHVjdFZhcmlhbnQ6Mjk3"}],
channel: "default-channel"
}) {
errors {
code
field
message
}
# Breaks GraphQL Codegen
# checkout {
# ${checkoutDetailsFragment}
# }
checkout {
${checkoutDetailsFragment}
}
}
}
`