> ## Documentation Index
> Fetch the complete documentation index at: https://hireflixsl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How-to: Scoring and Commenting on Interviews

## When to use this

Use these mutations during the review phase to **store a comment** and **assign or override a score** for an interview. If you want to retrieve comments and scores, see this guide for [fetching interview results](/features/interviews/fetching-interview-results).

<Tip>
  Recommendation: Run **comment** and **score** as **separate mutations**. This makes retries and error handling simpler (e.g., a score write can fail without losing the comment).
</Tip>

**What will you learn?**

* GraphQL Request: [Set or override a score](#graphql-request%3A-set-or-override-a-score)
* GraphQL Request: [Add a Comment](#graphql-request%3A-add-a-comment)

## GraphQL Request: Set or Override a Score

This first request allows you to submit a score between **0.5 and 5** with a **precision** **of** **0.5**. You can also set the score to `null` which unsets the current user's score. Make sure to replace the interview `<interview-id>` placeholder.

<iframe src="https://cdn.hireflix.com/graphql-playground/index.html?query=ScoreInterview&url=https://api.hireflix.com/me" width="100%" height="750" />

### Explanation

* **scoreInterview(score: 4.5)** sets or overrides the interview’s score.
* **score.value (`on InterviewType`)** is the **current score** for the interview. If multiple reviewers scored, this is the **team average**.
* **scores.overridenScore (`on InterviewType`)** appears when someone explicitly overrides their previous score.
* returns `InterviewType` | `InterviewNotFoundError` | `PositionNotFoundError` | `ForbiddenError` | `ValidationError`

If you look closely, you’ll also see the `computedScore` field. This represents the **average score per question**. By default, you can only score the interview as a whole. However, if you enable the **“Allow rating per question”** feature flag in your **Account Settings → Rating Settings**, you’ll be able to rate each question individually.

When this setting is enabled:

* `computedScore` is the reviewer’s average score across all rated questions.
* `score.value` is the overall average score across **all reviewers**.

### Example Response

```json theme={null}
{
  "data": {
    "scoreInterview": {
      "id": "68d4164f19367e041b2030c0",
      "score": {
        "value": 0.5
      },
      "scores": [
        {
          "computedScore": 2.5,
          "overridenScore": {
            "createdAt": 1758830984015,
            "updatedAt": 1783605314159,
            "value": 0.5
          },
          "scorer": {
            "lastname": "Greg",
            "name": "Bellens"
          }
        }
      ]
    }
  }
}
```

## GraphQL Request: Add a Comment

A recruiter can add a comment to each interview. Make sure to replace the interview `interviewId` and the `comment` with your actual comment. Don't forget to update the [Hireflix API Key](/quickstart) in the `headers`.

<iframe src="https://cdn.hireflix.com/graphql-playground/index.html?query=AddInterviewComment&url=https://api.hireflix.com/me" width="100%" height="750" />

### Explanation

* **commentInterview(comment: "...")** adds a new reviewer comment or replaces it. If you comment with `null`, it will remove the current comment.
* **comments (on InterviewType)** returns the full list of comments so you can refresh your UI. Use the `createdAt` and `updatedAt` timestamps to determine the order in your UI.

### Example Response

```json theme={null}
{
  "data": {
    "commentInterview": {
      "id": "68d4164f19367e041b2030c0",
      "comments": [
        {
          "createdAt": 1758831998524,
          "updatedAt": 1783605959342,
          "value": "Great candidate, only misses JavaScript skills",
          "author": {
            "lastname": "Greg",
            "name": "Bellens"
          }
        }
      ]
    }
  }
}
```

<Card title="Learn next?" icon="arrow-right" color="#5863ff" horizontal href="/features/interviews/updating-interview-status">
  Let's learn how to update an interview stage.
</Card>
