feat: bun server with graphql examples#584
Conversation
| @@ -0,0 +1,14 @@ | |||
| import { createServer } from 'node:http' | |||
There was a problem hiding this comment.
this is a node server demo repeating the dependency in the express example
admittedly, so is the @sveltejs/adapter-node -> sveltekit -> polka -> http example
but the leap from lambda to ssr is longer
There was a problem hiding this comment.
Fair point. I initially focused on GraphQL since it's popular tech that many developers are interested in, especially since this adapter I think makes it smoother to run on AWS. But you're right - it was essentially just another Node server example.
I've switched it to use Bun instead (while keeping the GraphQL parts), which was not a server I saw an example for yet.
There was a problem hiding this comment.
no objections to a merge
just nudging harold to start considering limiting lib examples because
❯ ls -1 examples | wc -l | xargs
42
risks inviting more questions about libs instead of a lambda event -> http request adapter
There was a problem hiding this comment.
Yeah, I understand this. Patching so many examples become a bit work by itself. We may split the examples to a seperate repo in aws-samples.
|
@sumcoding Thanks for such a nice example for both Bun and GraphQL! |
Issue #, if available:
N/A
Description of changes:
Currently there is no implementation of using the lambda web adapter to serve a graphql api backend. Nor one for bun.
This PR adds 2 examples using Bun server and yoga
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.