{
orders {
id
total
description
balanceDue
paymentsApplied {
amount
note
insertedAt
}
}
}
mutation {
createOrder(description: String, price: Integer) {
id
total
balanceDue
description
}
}
mutation {
makePayment(orderId: String, newBalance: Integer, note: String) {
id
total
balanceDue
description
paymentsApplied {
amount
note
insertedAt
}
}
}
Order and payment IDs handled by Ecto with :binary_id
Test suite contains idempotence tests for all mutations
mutation {
orderAndPay(description: String, price: Integer, balance: Integer) {
id
total
balanceDue
description
paymentsApplied {
amount
note
insertedAt
}
}
}
Tests for failure cases are included
subscription {
activity {
id
description
total
balanceDue
paymentsApplied {
amount
note
insertedAt
}
}
}
Tests included