From d79af43bc40ee93cd66a2661671f17f4f9f2f58f Mon Sep 17 00:00:00 2001 From: Jonas Helfer Date: Sun, 18 Dec 2016 23:26:04 +0800 Subject: [PATCH] Revert "Ensure transporters are using isomorphic-fetch instead of browser only whatwg-fetch" --- AUTHORS | 1 - package.json | 3 ++- src/transport/batchedNetworkInterface.ts | 2 +- src/transport/networkInterface.ts | 2 +- test/batchedNetworkInterface.ts | 2 +- test/mocks/mockFetch.ts | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index 0065cae9515..78d58842a31 100644 --- a/AUTHORS +++ b/AUTHORS @@ -9,7 +9,6 @@ David Alan Hjelle David Glasser Dhaivat Pandya Dhaivat Pandya -Guilherme Blanco Google Inc. Ian Grayson Ian MacLeod diff --git a/package.json b/package.json index d7f1df70b72..00e66824a6f 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "lodash": "^4.17.2", "redux": "^3.3.1", "symbol-observable": "^1.0.2", - "isomorphic-fetch": "^2.2.1" + "whatwg-fetch": "^2.0.0" }, "devDependencies": { "@types/chai-as-promised": "0.0.28", @@ -58,6 +58,7 @@ "grunt": "1.0.1", "grunt-tslint": "4.0.0", "gzip-size": "^3.0.0", + "isomorphic-fetch": "^2.2.1", "istanbul": "^0.4.5", "lodash": "^4.17.1", "minimist": "^1.2.0", diff --git a/src/transport/batchedNetworkInterface.ts b/src/transport/batchedNetworkInterface.ts index 10f3329059d..ae1bbbb842f 100644 --- a/src/transport/batchedNetworkInterface.ts +++ b/src/transport/batchedNetworkInterface.ts @@ -2,7 +2,7 @@ import { GraphQLResult, } from 'graphql'; -import 'isomorphic-fetch'; +import 'whatwg-fetch'; import assign = require('lodash/assign'); import isNumber = require('lodash/isNumber'); diff --git a/src/transport/networkInterface.ts b/src/transport/networkInterface.ts index 7948f2bc512..4e66d8dc73f 100644 --- a/src/transport/networkInterface.ts +++ b/src/transport/networkInterface.ts @@ -1,7 +1,7 @@ import isString = require('lodash/isString'); import assign = require('lodash/assign'); import mapValues = require('lodash/mapValues'); -import 'isomorphic-fetch'; +import 'whatwg-fetch'; import { GraphQLResult, diff --git a/test/batchedNetworkInterface.ts b/test/batchedNetworkInterface.ts index 9e5cba18841..d65b572f6dc 100644 --- a/test/batchedNetworkInterface.ts +++ b/test/batchedNetworkInterface.ts @@ -19,7 +19,7 @@ import { AfterwareInterface } from '../src/transport/afterware'; import { GraphQLResult } from 'graphql'; -import 'isomorphic-fetch'; +import 'whatwg-fetch'; import gql from 'graphql-tag'; diff --git a/test/mocks/mockFetch.ts b/test/mocks/mockFetch.ts index a86faf30036..08c0361f081 100644 --- a/test/mocks/mockFetch.ts +++ b/test/mocks/mockFetch.ts @@ -1,7 +1,7 @@ -import 'isomorphic-fetch'; +import 'whatwg-fetch'; -// This is an implementation of a mocked window.fetch/global.fetch implementation -// similar in structure to the MockedNetworkInterface. +// This is an implementation of a mocked window.fetch implementation similar in +// structure to the MockedNetworkInterface. export interface MockedIResponse { json(): Promise;