Skip to main content
Unlike the initiator’s attempt, which is created automatically when the battle is initiated, the opponent’s attempt should be created by executing the createBattleAttempt mutation. The mutation has one required argument - battleId. Here is an example of the mutation execution:
After the mutation is successfully executed, a BattleAttempt object will be returned.

BattleAttempt object

The object represents a battle attempt data. Each opponent can have only one attempt, a battle cannot be restarted.

BattleStatus options

The list of available BattleStatus options:
  1. COMPLETED - indicates that the battle has been completed by the current API user; also includes the battles that are not completed by the opponent yet.
  2. DRAW - indicates a tie, meaning that both opponents have earned the same score and spent the same amount of time;
  3. FINISHED - indicates that ths battle has been finished by both rivals.
  4. IN_PROGRESS - indicates that the battle have been started, but not completed by the user yet;
  5. PENDING - indicates that the battle has not been started by the user yet;
  6. LOST - indicates that the user has lost the battle;
  7. WAITING_OPPONENT - indicates that the battle is finished by the initiator, but not completed by the opponent yet.
  8. WON - indicates that the user has won the battle.

Battle attempt CTAs

The list of available CTAs can differ depending on the attempt status.