Skip to content

Commit c63786b

Browse files
authored
Add production dependency on @types/node-fetch. (#3546)
* Add production dependency on `@types/node-fetch`. As the `HeadersInit` is exported and used in the exported [`GatewayConfig`] type via [`RemoteGatewayConfig`] - which is emitted to `@apollo/gateway`'s `dist/index.d.ts` declaration, the `node-fetch` types need to be available by those who install the package. [`GatewayConfig`]: https://github.com/apollographql/apollo-server/blob/73cdf0d533908894282debdb6dc5444186af27a6/packages/apollo-gateway/src/index.ts#L74-L77 [`RemoteGatewayConfig`]: https://github.com/apollographql/apollo-server/blob/73cdf0d533908894282debdb6dc5444186af27a6/packages/apollo-gateway/src/index.ts#L62 Fixes: #3471 * Add CHANGELOG.md for #3546.
1 parent 3eaf8cf commit c63786b

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The version headers in this history reflect the versions of Apollo Server itself
66

77
> The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the the appropriate changes within that release will be moved into the new section.
88
9+
- `@apollo/gateway`: Add `@types/node-fetch` as a regular dependency to avoid missing dependency for TypeScript consumers. [PR #3546](https://github.com/apollographql/apollo-server/pull/3546) [Issue #3471](https://github.com/apollographql/apollo-server/issues/3471)
10+
911
### v2.9.12
1012

1113
- Reinstate [PR #3530](https://github.com/apollographql/apollo-server/pull/3530) via [#3539](https://github.com/apollographql/apollo-server/pull/3539) - after a patch release of the `@apollo/protobufjs` fork, the build issue for consumers should be resolved.

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/apollo-gateway/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
},
2121
"dependencies": {
2222
"@apollo/federation": "file:../apollo-federation",
23+
"@types/node-fetch": "2.5.4",
2324
"apollo-engine-reporting-protobuf": "file:../apollo-engine-reporting-protobuf",
2425
"apollo-env": "^0.6.0",
2526
"apollo-graphql": "^0.3.4",

0 commit comments

Comments
 (0)