apollo-server-integrations / apollo-server-integration-aws-lambda

An integration to use AWS Lambda as a hosting service with Apollo Server
MIT License
46 stars 9 forks source link

Provide ESM package version #152

Open d3c0d3dpt opened 9 months ago

d3c0d3dpt commented 9 months ago

@apollo/server inspired ESM build configs to provide a version of @as-integrations/aws-lambda compiled to ESM, together with the existing CJS version.

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: ff57d67acec5edbac39ec7468f010396a6fcd5d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | --------------------------- | ----- | | @as-integrations/aws-lambda | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

codesandbox-ci[bot] commented 9 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ff57d67acec5edbac39ec7468f010396a6fcd5d0:

Sandbox Source
apollo-server-integration-aws-lambda Configuration
trevor-scheer commented 9 months ago

I like the idea of this, but I don't think Apollo Server has it right currently, so I'm reluctant to adopt the same pattern until we figure out the right one. I unfortunately haven't had time to investigate this and I'm not sure when that might happen. Ref: https://github.com/apollographql/apollo-server/issues/7625

rsteele1-seic commented 5 months ago

Hi ALL! I got here from https://github.com/apollographql/apollo-server/issues/7625 and neither of these issues seem to have been touched since Nov '23. I was trying to jump on the Apollo V3 deprecation as of Nov '24, but our entire codebase is ESM and we are having the ESM/CJS conflict on this line of code export const graphqlHandler = startServerAndCreateLambdaHandler(server, requestHandler); with the following error error TS2345: Argument of type 'import("/src/testapollo/node_modules/@apollo/server/dist/esm/ApolloServer", { assert: { "resolution-mode": "import" } }).ApolloServer<import("/src/testapollo/node_modules/@apollo/server/dist/esm/externalTypes/context", { assert: { "resolution-mode": "import" } }).BaseContext>' is not assignable to parameter of type 'import("/src/testapollo/node_modules/@apollo/server/dist/cjs/ApolloServer").ApolloServer<import("/src/testapollo/node_modules/@apollo/server/dist/cjs/externalTypes/context").BaseContext>'. Types have separate declarations of a private property 'internals'.

Is there any update to a timeline on this issue?