Basicly I want to do take my serviceNo from my url and send it to graphql in query
My code is :
{
"endpoint": "/gw/graphql/{serviceNo}",
"input_query_strings": ["*"],
"method": "GET",
"output_encoding": "json",
"backend": [
{
"host": [
"<my_host>"
],
"url_pattern": "/my_url",
"encoding": "json",
"method": "GET",
"extra_config": {
"backend/graphql": {
"type": "query",
"query": "query Service($sNo: Int) {\n service(\n where: {mainServiceNo: {eq: $sNo}}\n ) {\n items {\n serialNo\n }\n }\n}",
"variables": {
"sNo": "{serviceNo}"
}
},
"backend/http": {
"return_error_details": "backend_alias"
}
}
}
]
}
{
"error_backend_alias": {
"http_status_code": 500,
"http_body":"{\"errors\":[{\"message\":\"Int cannot parse the given literal of type \`StringValueNode\`.\",\"path\":[\"sNo\"]}]}"
}
}
I have to send this parameter int , but in variables area it converts string I think,
I could not figure this out.
Can anybody help me please ?