graphile / crystal

🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!
https://graphile.org/
Other
12.62k stars 571 forks source link

Hono adaptor #2139

Open benjie opened 3 months ago

benjie commented 3 months ago

https://github.com/litewarp/graphile-tools/blob/main/packages/hono-adapter/src/adapter.ts

litewarp commented 3 months ago

Hey! Saw you made this, so I'll ask questions here to keep things organized.

Question 1 - how important are the http major and minor versions? The Hono context object doesn't provide them like aws. I could wrap the server to extract it from the raw request but wasn't sure if it was worth the effort.

benjie commented 3 months ago

I don't think they're currently used for anything; but they could be in future - there are certain things that are different between HTTP/1.1 vs HTTP/2+, for example chunked transfer encoding is not supported in HTTP/2+.

danzho commented 2 months ago

I've used Koa for idk, 10 years? Would love to migrate to Hono. 👍

rfdrake27 commented 2 months ago

I've used Koa for idk, 10 years? Would love to migrate to Hono. 👍

As someone who recently switched from Express to Hono Bun I highly recommend it. It just feels like a leaner and streamlined version of Express. It has definitely sped up development for me.

litewarp commented 1 month ago

Just an update. Bun should work fine with the original adapter I made above, but there is no http2 or grpc support until bun adopts that natively. It looks like there's work being done, so I'll revisit once it's complete -- https://github.com/oven-sh/bun/pull/14286