# Kong routing fails for graphQL API

**URL:** <https://discuss.konghq.com/t/kong-routing-fails-for-graphql-api/7777>\
**Category:** General\
**Tags:** kong-gateway\
**Created:** [January 21, 2021, 3:42pm UTC](https://discuss.konghq.com/t/kong-routing-fails-for-graphql-api/7777 "2021-01-21T15:42:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heema\_Hinduja](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/heema_hinduja/32/2505_2.png) [@Heema\_Hinduja](https://discuss.konghq.com/u/Heema_Hinduja)\
**Post date:** [January 21, 2021, 3:42pm UTC](https://discuss.konghq.com/t/kong-routing-fails-for-graphql-api/7777/1 "2021-01-21T15:42:48Z")

</div>

My backend grpahQL endpoint looks like this [http://localhost:80/query](http://localhost/query) and using graphQL query to call my backend api.

I configured my service as below  
{  
“host”: “localhost”,  
“id”: “b3e2c794-99d5-48d8-8522-54b78a89f396”,  
“protocol”: “http”,  
“read\_timeout”: 60000,  
“tls\_verify\_depth”: null,  
“port”: 80,  
“updated\_at”: 1611241742,  
“ca\_certificates”: null,  
“created\_at”: 1611241742,  
“connect\_timeout”: 60000,  
“write\_timeout”: 60000,  
“name”: “test”,  
“retries”: 5,  
“path”: “/query”,  
“tls\_verify”: null,  
“tags”: null,  
“client\_certificate”: null  
}

I configured my route as below:

{  
“id”: “04ba3459-6eaa-491e-8af1-ae9335e813d9”,  
“tags”: null,  
“paths”: null,  
“destinations”: null,  
“headers”: null,  
“protocols”: [  
“http”,  
“https”  
],  
“strip\_path”: true,  
“created\_at”: 1611241759,  
“request\_buffering”: true,  
“hosts”: [  
“localhost”  
],  
“name”: null,  
“updated\_at”: 1611241759,  
“snis”: null,  
“preserve\_host”: false,  
“regex\_priority”: 0,  
“methods”: null,  
“sources”: null,  
“response\_buffering”: true,  
“https\_redirect\_status\_code”: 426,  
“path\_handling”: “v0”,  
“service”: {  
“id”: “b3e2c794-99d5-48d8-8522-54b78a89f396”  
}  
}

While hitting the request via postman

[http://konghost:80/query](http://konghost/query) + graphQL query data as a body

I am getting error as 404 method not found

---

<div class="post-metadata">

**Author:** ![rviegas](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rviegas](https://discuss.konghq.com/u/rviegas)\
**Post date:** [January 21, 2021, 4:23pm UTC](https://discuss.konghq.com/t/kong-routing-fails-for-graphql-api/7777/2 "2021-01-21T16:23:17Z")

</div>

See the solution here: [Can I have a graphQL API as a upstream using kong gateway? - #5 by rviegas](https://discuss.konghq.com/t/can-i-have-a-graphql-api-as-a-upstream-using-kong-gateway/7739/5)

I hope this helps
