Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to existing
fetch
type, rather than that of `make-fetc… (apo…
…llographql/apollo-server#3829) These types are compatible, but this change is necessary to account for the fact that, while we have provided types for `make-fetch-happen` which matter during development of Apollo Server, we don't include those types in the distribution. We could do that, of course, but as I'll note in a minute, we want something more generic anyhow. The omission of the types in the published package (currently, before this commit) results in typing errors for consumers of `@apollo/gateway` since the `import` statement for the `Fetcher` type from `make-fetch-happen` is still emitted (see attached [[Screenshot]]). Switching to the type that `apollo-serve-env` already provides via its `fetch` implementation (literally, `typeof fetch`) should be a no-op change and actually provide the more generic compatibility we want for those who want to bring-their-own-fetch. This should be the same as any type provided by other Fetch-compatible packages as well, including `isomorphic-fetch`, etc. [Screenshot]: https://cc.jro.cc/E0uqEXrX Apollo-Orig-Commit-AS: apollographql/apollo-server@daac9ee
- Loading branch information