feat: allow for cashbox batch editing
This commit is contained in:
parent
21708aa75c
commit
d6d8280a36
5 changed files with 119 additions and 18 deletions
|
|
@ -3,6 +3,9 @@ const cashbox = require('../../../cashbox-batches')
|
|||
const resolvers = {
|
||||
Query: {
|
||||
cashboxBatches: () => cashbox.getBatches()
|
||||
},
|
||||
Mutation: {
|
||||
editBatch: (...[, { id, performedBy }]) => cashbox.editBatchById(id, performedBy)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ const typeDef = gql`
|
|||
type Query {
|
||||
cashboxBatches: [CashboxBatch]
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
editBatch(id: ID, performedBy: String): CashboxBatch
|
||||
}
|
||||
`
|
||||
|
||||
module.exports = typeDef
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue