Skip to content
On this page

TASK query will return a single task with selected field(s)


Query Structure:

task(id: ID!): Task

Argument(s):

This query must be made with a Task ID as argument:

  1. Task Id

    id : ID - the unique identifier of a task (compulsory)


Response:

An object containing details of a single task


This query will return all the fields of a TASK, as described in the types section. However, you can return whatever field(s) you choose.


Query Template:
query task($id: ID!){
    task(id:$id){
        task_id
        task_status
    }
}

//Variables
{ "id": "" }


Example:
query {
  task (id: "9c2ec735-e4c6-1b10-0636-9738aba762cf") {
    task_id
    task_status
    task_type
  }
}

RESPONSE:
{
  "data": {
    "task": {
      "task_id": "9c2ec735-e4c6-1b10-0636-9738aba762cf",
      "task_status": "unassigned",
      "task_type": "delivery"
    }
  }
}