diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f619e72684..4d2e482b8e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The version headers in this history reflect the versions of Apollo Server itself > 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. With few exceptions, the format of the entry should follow convention (i.e., prefix with package name, use markdown `backtick formatting` for package names and code, suffix with a link to the change-set à la `[PR #YYY](https://link/pull/YYY)`, etc.). When a release is being prepared, a new header will be (manually) created below and the appropriate changes within that release will be moved into the new section. - `apollo-server-express`: types: Export `ExpressContext` from main module. [PR #4821](https://github.com/apollographql/apollo-server/pull/4821) [Issue #3699](https://github.com/apollographql/apollo-server/issues/3699) +- `apollo-server-env`: types: The first parameter to `fetch` is now marked as required, as intended and in accordance with the Fetch API specification. [PR #4822](https://github.com/apollographql/apollo-server/pull/4822) [Issue #4741](https://github.com/apollographql/apollo-server/issues/4741) - `apollo-server-core`: Update `graphql-tag` package to `latest`, now with its `graphql-js` `peerDependencies` expanded to include `^15.0.0` [PR #4833](https://github.com/apollographql/apollo-server/pull/4833) ## v2.19.1 diff --git a/packages/apollo-server-env/src/fetch.d.ts b/packages/apollo-server-env/src/fetch.d.ts index 6d138daea2b..04932f68b14 100644 --- a/packages/apollo-server-env/src/fetch.d.ts +++ b/packages/apollo-server-env/src/fetch.d.ts @@ -2,7 +2,7 @@ import { Agent as HttpAgent } from 'http'; import { Agent as HttpsAgent } from 'https'; export declare function fetch( - input?: RequestInfo, + input: RequestInfo, init?: RequestInit, ): Promise; diff --git a/packages/apollo-server-env/src/global.d.ts b/packages/apollo-server-env/src/global.d.ts index 82813030cb7..ed81ff60d9d 100644 --- a/packages/apollo-server-env/src/global.d.ts +++ b/packages/apollo-server-env/src/global.d.ts @@ -1,5 +1,5 @@ declare function fetch( - input?: RequestInfo, + input: RequestInfo, init?: RequestInit, ): Promise; diff --git a/packages/apollo-server-plugin-operation-registry/src/make-fetch-happen.d.ts b/packages/apollo-server-plugin-operation-registry/src/make-fetch-happen.d.ts index 6b7f1737a10..f2290fa301a 100644 --- a/packages/apollo-server-plugin-operation-registry/src/make-fetch-happen.d.ts +++ b/packages/apollo-server-plugin-operation-registry/src/make-fetch-happen.d.ts @@ -46,7 +46,7 @@ declare module 'make-fetch-happen' { * @see: https://git.io/JvBwX */ export interface Fetcher { - (input?: RequestInfo, init?: RequestInit & FetcherOptions): Promise< + (input: RequestInfo, init?: RequestInit & FetcherOptions): Promise< Response >; }