GraphQL mutation function not returning mutated data

Viewed 17

The entry I want mutate (from Goal Table): Data Entry

The mutation function:

mutation updateGoalDuration($durationBeat: DurationBeatInput, $id: ID = <my-id>) {
  updateGoal(input: {goalTargetDuration: $durationBeat, id: $id}) {
    goalTargetDuration {
      durationHours
      durationMinutes
    }
  }
}

The input to the function:

{
  "durationBeat": {
    "durationHours": 2,
    "durationMinutes": 23,
    "durationSeconds": 0
  }
}

The result:

{
  "data": {
    "updateGoal": {
      "goalTargetDuration": {
        "durationHours": 1,
        "durationMinutes": 59
      }
    }
  }
}

My questions:

  1. Why is the response not of the updated data?
  2. Why is the entry not updating?
0 Answers
Related