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

Add node-fetch extensions typing #1602

Merged
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
All of the packages in the `apollo-server` repo are released with the same version numbers, so a new version of a particular package might not represent an actual change to that package. We generally try to mark changes that affect only one web server integration package with that package name, and don't specify package names for changes that affect most of the packages or which affect shared core packages.

### vNEXT
- Update graphql-playground-html to 1.7.4 [#1586](https://github.com/apollographql/apollo-server/pull/1586)

- Update `graphql-playground-html` to 1.7.4 [#1586](https://github.com/apollographql/apollo-server/pull/1586)
- Add support for `graphql-js` v14 by augmenting typeDefs with the `@cacheControl` directive so SDL validation doesn't fail [#1595](https://github.com/apollographql/apollo-server/pull/1595)
- Add `node-fetch` extensions typing to `RequestInit` [#1602](https://github.com/apollographql/apollo-server/pull/1602)

### v2.0.5

Expand Down
9 changes: 9 additions & 0 deletions packages/apollo-server-env/src/fetch.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Agent } from 'http';

export declare function fetch(
input?: RequestInfo,
init?: RequestInit,
Expand Down Expand Up @@ -55,6 +57,13 @@ export interface RequestInit {
cf?: {
[key: string]: any;
};

// The following properties are node-fetch extensions
follow: number;
timeout: number;
compress: boolean;
size: number;
agent?: Agent;
}

export type RequestMode = 'navigate' | 'same-origin' | 'no-cors' | 'cors';
Expand Down