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 • ID
• Required
ID of the navigation session to retrieve
Other fields
id • ID
ID of the navigation session
route_id • ID
The current route used for navigation
route_alternative_id • ID
The current route alternative used for navigation
state • NavigationState
The state of a navigation session. The status can be driving, charging, finished, or error
Show NavigationState enum values
state_of_charge • Float
State of charge at the last known location
Show arguments
last_known_location • Point
Last known location
next_station • NavigationStation
Next charging station
alternative_stations • NavigationStation
A set of alternative charging stations to next station
instructions • JSON
Navigation instructions
meta • NavigationMeta
Navigation meta information.
Response
A response can either contain a data
or an
errors
object. The response header will always return
200
as a status code.
Data object
When successful, a data
object will be returned with the
requested fields. If there are no fields present the
data
object will return the operation name with the
appropriate return type. If the operation was a query, this output
will be an object of the schema’s query root type; if the operation
was a mutation, this output will be an object of the schema’s mutation
root type.
Error object
If unsuccessful, an errors
object will be returned with
more details in the extensions
object. The error object
can contain any of the following objects.
Error
NAVIGATION_INVALID_MAPPING_LANGUAGE
Mapping language is not valid.
Error
NAVIGATION_INVALID_MAPPING_PROVIDER
Mapping provider is not valid.
Error
NAVIGATION_INVALID_ROUTE_STATUS
Cannot generate instructions mapping for route with status '$ROUTESTATUS'.
Error
NAVIGATION_NOT_FOUND
No navigation session was found with the provided ID.
Error
NAVIGATION_TRANSLATOR_NOT_FOUND
Translator for language "$LANGUAGE" was not found or loaded in the translators list.
Error
OPERATION_NOT_ALLOWED
You are not allowed to execute this operation. Enable it for the current application in the dashboard or reach out to customer support.
Error
ROUTE_POLYLINE_INVALID_DECIMALS
Value for decimals number is not valid. Allowed values are 5 or 6.