Query a navigation session

When you have obtained a navigation id through the startNavigation mutation, you can query for its current state.

Query

To query the navigation details you will need to provide the navigation ID as an argument. For doing turn-by-turn navigation we strongly recommend you to use the subscription service. A subscription provides you with updates on the navigation session whilst a navigation query only gives you a snapshot of the current state.

Arguments

  • id non_null
    Required

    ID of the navigation session to retrieve

  • Other fields

  • id non_null

    ID of the navigation session

  • route_id string

    The current route used for navigation

  • route_alternative_id string

    The current route alternative used for navigation

  • state enum NavigationState

    The state of a navigation session. The status can be driving, charging, finished, or error

  • state_of_charge float

    State of charge at the last known location

  • last_known_location object Point

    Last known location

  • next_station object NavigationStation

    Next charging station

  • alternative_stations list [NavigationStation]

    A set of alternative charging stations to next station

  • instructions json

    Navigation instructions

    Show arguments

  • instructions_format non_null InstructionsFormat

    Turn by turn instructions format for a route

  • language enum MappingLanguage

    Preferred navigation instructions language. Default: en

  • precision int

    Number of decimals used for the Google Polyline encoding Algorithm. Allowed values are 5 or 6, the default is 5

  • Response

    If successful, the HTTP status code in the response header is 200 and the response body contains the attributes you requested.

    If unsuccessful, the header status code is an error code and the response body contains an error response object. The error response object can be any of the ones below.

    Errors & warnings

    • Error
      ROUTE_POLYLINE_INVALID_DECIMALS

      Value for decimals number is not valid. Allowed values are 5 or 6

    Response

    If successful, the HTTP status code in the response header is 200 and the response body contains the attributes you requested. The most important value here is the status field. This will tell you what data is available.