What do I need to do to configure properly a simple graphQL API in the Kong gateway (open source)?
Do I need to use a plugin?
basically, I have a graphQL API running ``http://localhost:5005/graphql```
and here what I did in kong:
service
{
"host": "localhost",
"id": "bf209028-20b8-48b4-84ed-87096114d7cf",
"protocol": "http",
"read_timeout": 60000,
"tls_verify_depth": null,
"port": 5005,
"updated_at": 1610631073,
"ca_certificates": null,
"created_at": 1610630921,
"connect_timeout": 60000,
"write_timeout": 60000,
"name": "hop-data-service",
"retries": 5,
"path": "/",
"tls_verify": null,
"tags": [
"dev"
],
"client_certificate": null
}
route
{
"next": null,
"data": [
{
"id": "4c170be9-ffb0-4d4c-b61a-79f701493da6",
"tags": null,
"updated_at": 1610631819,
"destinations": null,
"headers": null,
"protocols": [
"http",
"https"
],
"strip_path": false,
"created_at": 1610630973,
"request_buffering": true,
"hosts": null,
"name": "default",
"service": {
"id": "bf209028-20b8-48b4-84ed-87096114d7cf"
},
"paths": [
"/graphql"
],
"preserve_host": false,
"regex_priority": 0,
"response_buffering": true,
"sources": null,
"methods": [
"POST"
],
"https_redirect_status_code": 426,
"path_handling": "v1",
"snis": null
}
]
}
when making a request to http://{{kong-server}}/graphql
I am getting the message below:
{
"message": "An invalid response was received from the upstream server"
}