curveball / core

The Curveball framework is a TypeScript framework for node.js with support for modern HTTP features.
https://curveballjs.org/
MIT License
526 stars 7 forks source link

GraphQL middleware? #153

Closed NetOpWibby closed 2 years ago

NetOpWibby commented 4 years ago

FINALLY there's a server project written in TypeScript. Thanks for this.

I've been trying to get express-graphql to work with curveball, with no luck. Is there a simpler module that will allow me to utilize GraphQL for this API rewrite I'm working on?

evert commented 4 years ago

Hi!

Retrofitting an express middleware will for sure be a pain, as they pretty much expect to have access to the raw underlying Node.js http request and response messages, which curveball hides. I'm also not aware of a graphql middelware for curveball.

So your best bet might by to try and take express-graphql, fork it and modify the express relates parts. From the look of it, there's not that many of those, and most of the boilerplate in that source is specific to graphql, not express.

NetOpWibby commented 4 years ago

I feared as much and started to look at minimal GraphQL server projects. Currently trying to retrofit something easier.