Example running apollo-server-lambda on zeit now
See original GitHub issueI’m wondering if anyone has successfully run apollo-server-lambda on zeit now v2.
When I copy and paste the simple hello world example from apollo-server-lambda’s docs I’m getting this error:
TypeError: "listener" argument must be a function
I then see it’s specifically for vanilla lambdas on AWS and has a exports.handler = … rather than module.exports = … as is common on zeit now. However, as you’d expect switching to the latter doesn’t work either and produces:
UnhandledPromiseRejectionWarning: TypeError: callback is not a function
Does anyone have any thoughts on getting this to run?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Deploying with AWS Lambda - Apollo GraphQL Docs
For this example, we'll start from scratch to show how all the pieces fit together. Begin by installing the necessary packages for using...
Read more >apollo-server-lambda | Yarn - Package Manager
apollo -server-lambda : This package is now implemented as a wrapper around apollo-server-express . createHandler 's argument now has different options:.
Read more >How to deploy Next.js with GraphQL backend on Zeit Now?
... complete example of Next.js/Apollo GraphQL running both on Zeit Now (as serverless function/lambda) and Heroku (with an Express server):.
Read more >How to Build a Serverless Apollo GraphQL Server with AWS ...
Now we've got our Apollo Server implemented with TypeScript, but how do we “run” the Server? Unlike “traditional” servers, you cannot simply run...
Read more >How to deploy an Apollo GraphQL server running in AWS ...
This video shows how to deploy an Apollo GraphQL server running in a Lambda function on AWS using AWS Amplify Functions and connect...
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
Worth noting that the docs at
docs/source/deployment/now.md
still refer to Now v1Thanks to your assistance, @notrab, was able to get it to work with CORS. Afterwards, in a moment of utter ‘duh’-ness, I realized I didn’t have to use CORS in the first place if I have both the client and server in the same project using Now. 😂 (I had been so indoctrinated to keep those two parts separate, it didn’t even occur to me to integrate them into the same project.)
Adding this to the general knowledge base: https://medium.com/ecstatic-engineering/how-to-deploy-a-graphql-server-with-prisma-to-a-serverless-platform-49c573e9b26e