kaelzhang / express-to-koa

Use express middlewares in Koa2, the one that really works.
Other
20 stars 5 forks source link

express-graphql does not return from XHR #3

Open yanickrochon opened 4 years ago

yanickrochon commented 4 years ago

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.

kaelzhang commented 4 years ago

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 commented 4 years ago

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

yanickrochon commented 4 years ago

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.)

kaelzhang commented 4 years ago

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