apollo-server icon indicating copy to clipboard operation
apollo-server copied to clipboard

Call for maintainers: apollo-server-lambda

Open glasser opened this issue 3 years ago • 2 comments
trafficstars

As described in the roadmap, Apollo Server 4 will shift from the model of "9 web framework integrations maintained by a team who only uses one of them and nope, you can't create your own" to "a stable web framework integration API that anyone can use for their favorite web framework".

As part of this, the Apollo Server core team is no longer planning to maintain apollo-server-lambda. We think users of Lambda are best served if their framework integration is maintained by a team of people who use Lambda every day.

This is where you come in! Do you love Lambda? Do you use it with Apollo Server? Would you like to be part of a team of community members who maintain apollo-server-lambda?

If so, chime in below! We'd love to find a group of people who will maintain the Apollo Server 4 version of apollo-server-lambda, and to help us maintain the section of the Apollo Server docs that shows how to use Apollo Server with Lambda.

We expect that maintaining this package will be more straightforward than maintaining an Apollo Server integration today, because its only responsibility will be translating Lambda's HTTP request and response objects to the formats used by Apollo Server's new API.

At the time that this issue is opened, we are actively looking for interested collaborators; however, the API you'll be implementing isn't yet ready. We can use this issue to get a team together who can get started at some point between an initial alpha release of the new @apollo/server package and the final v4.0.0 release.

Some Lambda-specific notes:

  • After Express and the standalone server built on top of Express, this is the most popular Apollo Server integration! It gets lots of questions on the issue and it will be great to have a team of dedicated Lambda users helping it out.
  • The model we use for apollo-server-lambda in Apollo Server 3 is that it's just a bit of glue between apollo-server-express and @vendia/serverless-express, a package that lets you run Express apps on various AWS services that can call Lambda functions. This has worked reasonably well in that it has moved the raw "Lambda event parsing" code out of Apollo Server to a more focused module, and it allows people to extend their app using Express middleware. But this isn't the only model imaginable for AS4! I could imagine choosing to write the conversion between Lambda events and the new Apollo Server 4 request/response data structures yourself. Or writing middleware for a different middleware system such as Middy. In fact, I can imagine there being two or three different Lambda integration packages for these different strategies. We don't want to limit the creativity of the community here. Decoupling this package from the core release cycle (and making it a client rather than a subclass of ApolloServer) should make this flexibility a lot easier.
  • In AS3, there's some boilerplate in all the serverless integration libraries around handling startup errors. We'll make that simpler in AS4 by building that into the main ApolloServer state machine when in "serverless mode".

glasser avatar Jan 25 '22 21:01 glasser

If you're reading this, we're ready for you! We feel that Apollo Server 4's API is in a good place for integration authors to start building against. We've written a step-by-step guide and built out a couple of working examples.

If you're here and you're interested, please ping us here on the issue and let us know! I'm happy to answer any questions and help however I'm able.

-- Trevor

trevor-scheer avatar Jul 28 '22 23:07 trevor-scheer

I've used lambda extensively and would be interested in helping maintain the lambda integration!

BlenderDude avatar Aug 02 '22 17:08 BlenderDude

For anyone who finds this issue in the future, we have started up an organization for apollo-server-integrations to gather a couple of integrations together. The AWS Lambda handler repo lives here with a published package on npm. Everyone is welcome to contribute to that organization and its repositories inside of it 🎉

michael-watson avatar Sep 21 '22 18:09 michael-watson