Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bun server with graphql examples #584

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sumcoding
Copy link

@sumcoding sumcoding commented Mar 14, 2025

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

  • streaming via lambda url and graphql subscriptions via bun
  • basic graphql api functionality via the api gateway via bun

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sumcoding sumcoding requested a review from a team as a code owner March 14, 2025 13:35
@@ -0,0 +1,14 @@
import { createServer } from 'node:http'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sumcoding sumcoding changed the title feat: graphql examples feat: bun server with graphql examples Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants