mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Order checkout process implemented without validations
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
export const addPaymentToOrderMutation = /***/`
|
||||
mutation addPaymentToOrder($input: PaymentInput!) {
|
||||
addPaymentToOrder(input: $input) {
|
||||
__typename
|
||||
...on Order {
|
||||
id
|
||||
state
|
||||
customer {
|
||||
id
|
||||
}
|
||||
totalQuantity
|
||||
lines {
|
||||
id
|
||||
}
|
||||
}
|
||||
...on OrderPaymentStateError {
|
||||
errorCode
|
||||
message
|
||||
}
|
||||
...on IneligiblePaymentMethodError {
|
||||
errorCode
|
||||
message
|
||||
eligibilityCheckerMessage
|
||||
}
|
||||
...on ErrorResult {
|
||||
errorCode
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
@@ -0,0 +1,34 @@
|
||||
// {
|
||||
// title: "John Adams"
|
||||
// firstName: "John"
|
||||
// lastName: "Adams"
|
||||
// phoneNumber: "+99312345678"
|
||||
// emailAddress: "john@example.com"
|
||||
// }
|
||||
|
||||
export const setCustomerForOrderMutation = /* GraphQL*/ `
|
||||
mutation setCustomerForOrder($input: CreateCustomerInput!) {
|
||||
setCustomerForOrder(input: $input){
|
||||
__typename
|
||||
...on Order {
|
||||
id
|
||||
state
|
||||
customer {
|
||||
id
|
||||
}
|
||||
totalQuantity
|
||||
lines {
|
||||
id
|
||||
}
|
||||
}
|
||||
...on AlreadyLoggedInError {
|
||||
errorCode
|
||||
message
|
||||
}
|
||||
...on NoActiveOrderError {
|
||||
errorCode
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
@@ -0,0 +1,22 @@
|
||||
export const setOrderShippingAddressMutation = /* GraphQL */ `
|
||||
mutation setOrderShippingAddress($input: CreateAddressInput!) {
|
||||
setOrderShippingAddress(input: $input) {
|
||||
__typename
|
||||
...on Order {
|
||||
id
|
||||
state
|
||||
customer {
|
||||
id
|
||||
}
|
||||
totalQuantity
|
||||
lines {
|
||||
id
|
||||
}
|
||||
}
|
||||
...on ErrorResult {
|
||||
errorCode
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
@@ -0,0 +1,29 @@
|
||||
export const transitionOrderToStateMutation = /* GraphQL */ `
|
||||
mutation transitionOrderToState($state: String!) {
|
||||
transitionOrderToState(state: $state) {
|
||||
__typename
|
||||
...on Order {
|
||||
id
|
||||
state
|
||||
customer {
|
||||
id
|
||||
}
|
||||
totalQuantity
|
||||
lines {
|
||||
id
|
||||
}
|
||||
}
|
||||
...on ErrorResult {
|
||||
errorCode
|
||||
message
|
||||
}
|
||||
...on OrderStateTransitionError {
|
||||
errorCode
|
||||
message
|
||||
transitionError
|
||||
fromState
|
||||
toState
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
Reference in New Issue
Block a user