feat: implement on demand exercises
### Additions * added new mutation `startOnDemandExercise(teamId: ID!): ExerciseType!` * added new mutation `stopOnDemandExercise(teamId: ID!): ExerciseType!` * added new mutation `finishOnDemandExercise(teamId: ID!): ExerciseType!` * added field `sentTo: [ID!]!` to `SendCustomInjectMutation` mutation which contains the team ids to which the inject was sent to * added field `onDemand: Boolean = False` to `CreateExerciseType` type * added field `onDemand: Boolean = False` to `CreateExerciseInput` input * added new subscription `exerciseState(teamIds: [ID!]!): ExerciseStateType!` ### Changes * changed `exerciseLoopRunning(exerciseId: ID!): Boolean!` query to `exerciseLoopRunning(teamId: ID!): Boolean!` * changed field `state: ExerciseStateType!` on `ExerciseType` to `states: [ExerciseStateType!]!`, this field only returns states to which the user has access to through the team assignment * changed the behavior of `stop/finishExercise(exerciseId: ID!): ExerciseType!` mutations to work as bulk operations on all eligible exercise states, furthermore, it is now possible to call stop on a non-running exercise and finish on an already finished exercise, in which case it is a noop * changed query `exerciseTimeLeft(exerciseId: ID!): Int!` to `exerciseTimeLeft(teamId: ID!): Int!` Closes #426
Loading
Please sign in to comment