To facilitate better answering of questions, if you have a question, please fill in the following info. Otherwise, please delete the template.
What I want to do
Query External rest endpoint.
I want to access external service by rest endpoint. But I don’t get any response, Error, Can’t access log’s. How can I debug this query.
What I did
Schema:
type Directions @remote{
bbox: [Float],
metadata: DirectionsMetadata
}
type DirectionsMetadata @remote{
attribution:String,
service: String,
timestamp: Int64,
engine: RouterEngine,
profile:String,
format:String,
}
type RouterEngine @remote{
version: String,
build_date: DateTime,
graph_date: DateTime
}
type Query{
getDirections(type:String!="driving-car"): Directions @custom(
http: {
url: "https://api.openrouteservice.org/v2/directions/driving-car",
method: POST,
introspectionHeaders: ["Route-Token"],
secretHeaders: ["Authorization:Route-Token"],
body: "{coordinates:[[8.681495,49.41461],[8.686507,49.41943],[8.687872,49.420318]]}",
}
)
}
Query:
query MyQuery {
getDirections(type: "driving-car") {
bbox
metadata {
attribution
format
profile
service
timestamp
}
}
}
Response:
{
"data": {
"getDirections": null
},
"extensions": {
"tracing": {
"version": 1,
"startTime": "2022-09-26T18:04:10.629152407Z",
"endTime": "2022-09-26T18:04:10.641457794Z",
"duration": 12305403
}
}
}
Dgraph metadata
Current version