Files
bbs/frontend/src/features/register/createOrder.graphql
T
nikolark 2bcc993aaa ✨ Show details about purchase
🐛 Update user balance
2021-12-04 23:30:44 +01:00

45 lines
835 B
GraphQL

mutation CreateOrder($customerId: ID!, $orderLines:[OrderLineInput!]!, $isExternal: Boolean!) {
createOrder(customerId: $customerId, orderLines: $orderLines, isExternal: $isExternal) {
... on CreateOrderSuccess {
order {
id
isExternal
customer {
id
firstName
lastName
profile {
id
balance
}
}
orderlines {
id
amount
unitPrice
product {
id
name
salePriceExt
salePriceInt
}
}
orderSum
}
}
... on InsufficientFunds {
error
message
amountLacking
}
... on FormErrors {
error
message
fields {
field
message
}
}
}
}