✨ Add basic deposit functionality

This commit is contained in:
nikolark committed 2021-11-18 22:58:32 +01:00
1 parent 40b3cb119f
commit 3d93a645ad
9 files changed
+254 -8

No files matched your search

+21
View File
@@ -1,3 +1,16 @@
type AboveMaxSaldo implements Error {
message: String!
error: Boolean!
maxSaldo: Float!
above: Float!
}
union CreateDepositResponse = CreateDepositSuccess | AboveMaxSaldo | FormErrors
type CreateDepositSuccess {
transaction: Transaction!
}
union CreateOrderResponse = CreateOrderSuccess | InsufficientFunds | FormErrors
type CreateOrderSuccess {
@@ -32,6 +45,7 @@ type InsufficientFunds implements Error {
type Mutation {
createOrder(customerId: ID!, orderLines: [OrderLineInput!]!, isExternal: Boolean! = false): CreateOrderResponse!
createDeposit(userId: ID!, amount: Int!): CreateDepositResponse!
}
type Order {
@@ -65,6 +79,13 @@ type Query {
allOrders: [Order!]!
}
type Transaction {
id: ID!
user: User!
amount: Float!
created: DateTime!
}
type User {
id: ID!
firstName: String!