[Feature request] Support Zeit Now v2 lambda
See original GitHub issueFirst of all I’d like to thank you for this awesome project!
I’d like to ask you to support Now v2 lambdas. Their lambdas have a different signature than AWS. It’s like this (more info here):
const { parse } = require('url')
module.exports = (req, res) => {
const { query } = parse(req.url, true)
const { name = 'World' } = query
res.end(`Hello ${name}!`)
}
It seems for me that returning “app” at this point and just exporting as module.exports would do the job. https://github.com/prisma/graphql-yoga/blob/master/src/index.ts#L351
The idea is to create another function on the server, maybe createExpressApp or something that would return the configured express server and receive the same Options as createHttpServer receives. This function would be used on createHttpServer up to the line 351.
I’ll submit a PR for it later. Thanks 👍
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
Ability to build for zeit/now serverless functions · Issue #16 ...
Feature request : Ability to build for zeit/now serverless functions #16 ... on 2 linux boxes (my local and remote lambda builder.).
Read more >Zeit Now v2 workflow - Gleb Bahmutov
If we have a hundred separate lambdas, how do we provide uniform API endpoints? We can define a routing structure on top of...
Read more >Lambda runtimes - AWS Documentation
Lambda supports multiple languages through the use of runtimes. For a function defined as a container image, you choose a runtime and the...
Read more >Firebase + Lambda + Zeit now - Remy Sharp
I've been playing with Zeit's v2 now platform, and in particular I ... AWS lambda with Now uses node@8.10 - ensure your modules...
Read more >Goodbye Zeit Now v1, hello datasette-publish-now—and ...
I first started experiencing with Zeit's serverless Now hosting ... v2 is built on top of serverless functions—AWS Lambda in particular.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Use my fork if you want: I use it on production and it works fine https://github.com/lucasavila00/graphql-yoga/ https://www.npmjs.com/package/graphql-yoga-dgt
Usage:
If any mantainer likes this approach feel free to implement this or ping me for a PR
@lucasavila00 Conseguiu pôr isto a funcionar?