-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-lambda used in ApolloServer.d.ts not referenced in package.json #2351
Labels
🧬 typings
Relates to TypeScript changes or improvements.
Comments
Problem remains on apollo-server-lambda 2.4.3. |
abernix
added a commit
that referenced
this issue
Sep 1, 2019
…da`. The typings provided by `aws-types` are used on public methods within the `apollo-server-express` package and, therefore, must be included as direct (not development) dependencies to ensure they are available to packages which utilize it since we don't publish types separately (e.g. via DefinitelyTyped). For example, these usages: https://github.com/apollographql/apollo-server/blob/aa3e23de9fbcde41a1bd3cca9c2eacf734bae582/packages/apollo-server-lambda/src/lambdaApollo.ts#L16-L18 https://github.com/apollographql/apollo-server/blob/aa3e23de9fbcde41a1bd3cca9c2eacf734bae582/packages/apollo-server-lambda/src/ApolloServer.ts#L100-L104 And seen in the emitted type declarations here: https://unpkg.com/apollo-server-lambda@2.9.0/dist/ApolloServer.d.ts https://unpkg.com/apollo-server-lambda@2.9.0/dist/lambdaApollo.d.ts (Note the `import` statements, which must be resolvable by TypeScript!) Fixes: #2351
abernix
added a commit
that referenced
this issue
Sep 1, 2019
* types: Add `@types/aws-lambda` as a dependency of `apollo-server-lambda`. The typings provided by `aws-types` are used on public methods within the `apollo-server-express` package and, therefore, must be included as direct (not development) dependencies to ensure they are available to packages which utilize it since we don't publish types separately (e.g. via DefinitelyTyped). For example, these usages: https://github.com/apollographql/apollo-server/blob/aa3e23de9fbcde41a1bd3cca9c2eacf734bae582/packages/apollo-server-lambda/src/lambdaApollo.ts#L16-L18 https://github.com/apollographql/apollo-server/blob/aa3e23de9fbcde41a1bd3cca9c2eacf734bae582/packages/apollo-server-lambda/src/ApolloServer.ts#L100-L104 And seen in the emitted type declarations here: https://unpkg.com/apollo-server-lambda@2.9.0/dist/ApolloServer.d.ts https://unpkg.com/apollo-server-lambda@2.9.0/dist/lambdaApollo.d.ts (Note the `import` statements, which must be resolvable by TypeScript!) Fixes: #2351 * Add CHANGELOG.md entry for #3242.
Should be fixed in 2.9.3! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I run
tsc
on my project which includes apollo-server-lambda 2.4.2 but not aws-lambda, this error is returned:I can resolve it by
yarn add @types/aws-lambda aws-lambda
but believe that this should be done at the library level.
The text was updated successfully, but these errors were encountered: