Skip to content
On this page

TOUR query will return a single tour with selected field(s)


Query Structure:

tour(tourid: ID!): Tour

Argument(s):

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

  1. Tour Id

    tourid : ID - the unique identifier of a tour (compulsory)


Response:

An object containing details of a single task


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


Query Template:
query tour($tourid: ID!){
    tour(tourid:$tourid){
        vehicle
        distance
        status
        id
    }
}

//Variables
{ "tourid": "" }


Example:
query {
  tour(tourid: "14bb75b5-97bf-4143-8a21-ad512565aecb") {
    vehicle
    distance
    status
    id
  }
}

RESPONSE:
{
  "data": {
    "tour": {
      "vehicle": "car",
      "distance": 3854.4610000000002,
      "status": "finished",
      "id": "14bb75b5-97bf-4143-8a21-ad512565aecb"
    }
  }
}