Skip to content
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

fix(types): Make initial argument to fetch required, per spec #4822

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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