You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently upgrade from apollo-server-lambda v2.25.1 to v3.6.1 following the migration guide. Since then I'm getting the following error when sending requests to the GraphQL Endpoint that is hosted on Vercel.
[POST] /api
19:28:08:34
2022-01-09T18:28:10.719Z 2014d7ba-295d-4344-a94a-007608d4788b ERROR Invoke Error {"errorType":"Error","errorMessage":"Unable to determine event source based on event.","stack":["Error: Unable to determine event source based on event."," at getEventSourceNameBasedOnEvent (/var/task/node_modules/@vendia/serverless-express/src/event-sources/utils.js:88:9)"," at proxy (/var/task/node_modules/@vendia/serverless-express/src/configure.js:38:51)"," at handler (/var/task/node_modules/@vendia/serverless-express/src/configure.js:99:12)"," at Object.handler (/var/task/node_modules/apollo-server-lambda/dist/ApolloServer.js:51:27)"]}
apollo-server-lambda is designed to be run on Lambda. Vercel is not Lambda, so I would not expect this to work. Does vercel have some sort of Lambda-compatible emulation environment?
In any case, if this is an environment that can be supported, the proper way to do this is in @vendia/serverless-express as you've found above. Apollo Server is no longer in the business of understanding the various Lambda HTTP hosting environments and formats at a deep level.
I've recently upgrade from apollo-server-lambda v2.25.1 to v3.6.1 following the migration guide. Since then I'm getting the following error when sending requests to the GraphQL Endpoint that is hosted on Vercel.
How I'm creating the apollo server:
https://github.com/electerious/Ackee/blob/develop/src/utils/createApolloServer.js
https://github.com/electerious/Ackee/blob/develop/src/serverless.js#L16
How I'm creating the handler:
https://github.com/electerious/Ackee/blob/develop/src/serverless.js#L30
Related:
CodeGenieApp/serverless-express#416
The text was updated successfully, but these errors were encountered: