AlmondTill/G3N API

startTrainingPractice

mutation · in the family Your own session

What it does

Start a practice run of a course’s test — the same draw a sitting makes, rehearsed against your pass mark; nothing is certified.

Start your own practice of a course's test

Before you call

A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).

Capability area: Your own session — What every signed-in person may do for themselves — their session, their profile and their own work.

Roles that may call it:

What happens

Writes only your own progress record; a new start replaces the open practice; at most twenty a day.

Arguments

NameTypeRequiredNotes
courseKeyString String!yes

Returns

TrainingPracticeSitting TrainingPracticeSitting! — A practice draw opened: the course, the pass mark you rehearse against (the strictest rule binding your roles for the course, else 80), the drawn questions in the order asked, when. Nothing is certified.

Example request

graphql
mutation ExampleStartTrainingPractice($courseKey: String!) {
  startTrainingPractice(courseKey: $courseKey) {
    courseKey
    passMark
    startedAt
  }
}

Variables:

json
{
  "courseKey": "<course key>"
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "startTrainingPractice": {
      "courseKey": "<course key>",
      "passMark": 1,
      "startedAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer