Skip to content

Commit

Permalink
fix(types): Make initial argument to fetch required, per spec (#4822)
Browse files Browse the repository at this point in the history
  • Loading branch information
abernix authored Jan 14, 2021
1 parent 146e84a commit 4dce53c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-env/src/fetch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Response>;

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-env/src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare function fetch(
input?: RequestInfo,
input: RequestInfo,
init?: RequestInit,
): Promise<Response>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
>;
}
Expand Down

0 comments on commit 4dce53c

Please sign in to comment.