Skip to content

Commit

Permalink
Add node-fetch extensions typing (#1602)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyaohira authored and martijnwalraven committed Sep 2, 2018
1 parent 49d4ffb commit 6c44631
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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

0 comments on commit 6c44631

Please sign in to comment.