Skip to content

Retrying on version conflicts

Trym Skaar edited this page Feb 24, 2018 · 1 revision

You can decorate your command functions by using aggregateCommand()

import {aggregateCommand} from 'ddbes'

async function addItem(name) {
  // ...
  await this.commit({type: 'ItemAdded', name})
}

export default aggregateCommand(myCommand, {retry: true})