Skip to content
On this page

DRIVER query will return a single driver with selected field(s)


Query Structure:

driver(driverid: ID!): Driver

Argument(s):

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

  1. Driver Id

    driverid : ID - the unique identifier of a Driver (compulsory)


Response:

An object containing details of a single driver


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


Query Template:
query driver($driverid: ID!){
    driver(driverid:$driverid){
     firstName
     lastName
     id
    }
}

//Variables
{ "driverid": "" }


Example:
query {
  driver (driverid: "8908019a-0eeb-eefa-d0ca-f4c94074c70a") {
    firstName
    lastName
    id
  }
}

RESPONSE:
{
  "data": {
    "driver": {
      "firstName": "Max",
      "lastName": "Munstermann",
      "id": "8908019a-0eeb-eefa-d0ca-f4c94074c70a"
    }
  }
}