express-to-koa icon indicating copy to clipboard operation
express-to-koa copied to clipboard

express-graphql does not return from XHR

Open yanickrochon opened this issue 4 years ago • 4 comments

Because koa-graphql is 2 years outdated, I'm (temporaily?) using express-graphql. Everything seems fine, the GraphiQL interface loads, but submiting a query falls in pending then time out.

yanickrochon avatar Apr 20 '20 14:04 yanickrochon

express-graphql uses some express-only methods, such as response.json(object), which is a really bad practice.

So, express-to-koa could not support express-graphql

I suggest to create an issue to express-graphql to discuss whether the project could avoid this.

kaelzhang avatar Apr 20 '20 15:04 kaelzhang

Checkout this: https://github.com/kaelzhang/express-to-koa#what-kind-of-express-middlewares-are-supported

kaelzhang avatar Apr 20 '20 15:04 kaelzhang

Thank you for answering. This is quite unfortunate for the Koa community that the ultimate solution to most of the problems with koa middleware is : use express or wait for someone to possibly fix it. There is a project to wrap this module, koa-graphql but there's no one to update it. (I have contacted the guys at the GraphQL community if they can do anything to help.)

yanickrochon avatar Apr 20 '20 15:04 yanickrochon

As long as a middleware is express-independent, express-to-koa is able to handle it 😄

kaelzhang avatar Apr 20 '20 15:04 kaelzhang