45 lines
835 B
GraphQL
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
|
|
}
|
|
}
|
|
}
|
|
}
|