diff --git a/AUTHORS b/AUTHORS index a9974e2b7db..c2181fe0803 100644 --- a/AUTHORS +++ b/AUTHORS @@ -9,6 +9,7 @@ David Alan Hjelle David Glasser Dhaivat Pandya Dhaivat Pandya +Guilherme Blanco Google Inc. Ian Grayson Ian MacLeod diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cfad19fe92..f940ffb1b4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Expect active development and potentially significant breaking changes in the `0.x` track. We'll try to be diligent about releasing a `1.0` version in a timely fashion (ideally within 3 to 6 months), to signal the start of a more stable API. ### vNEXT +- Ensure transporters are using `isomorphic-fetch` instead of `whatwg-fetch` for universal compatibility [PR #1018](https://github.com/apollostack/apollo-client/pull/1018) ### 0.5.13 - Replace usages of `Object.assign` with lodash's assign function [PR #1009](https://github.com/apollostack/apollo-client/pull/1009) diff --git a/package.json b/package.json index 1528c8fe76a..73132f075a9 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "lodash": "^4.17.2", "redux": "^3.3.1", "symbol-observable": "^1.0.2", - "whatwg-fetch": "^2.0.0" + "isomorphic-fetch": "^2.2.1" }, "devDependencies": { "@types/chai-as-promised": "0.0.28", @@ -56,7 +56,6 @@ "grunt": "1.0.1", "grunt-tslint": "3.3.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 7b1f40f3df7..cbf03158db5 100644 --- a/src/transport/batchedNetworkInterface.ts +++ b/src/transport/batchedNetworkInterface.ts @@ -2,7 +2,7 @@ import { GraphQLResult, } from 'graphql'; -import 'whatwg-fetch'; +import 'isomorphic-fetch'; import assign = require('lodash/assign'); import isNumber = require('lodash/isNumber'); diff --git a/src/transport/networkInterface.ts b/src/transport/networkInterface.ts index 0c3cecb5cd5..d5e7390922d 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 'whatwg-fetch'; +import 'isomorphic-fetch'; import { GraphQLResult, diff --git a/test/batchedNetworkInterface.ts b/test/batchedNetworkInterface.ts index d65b572f6dc..9e5cba18841 100644 --- a/test/batchedNetworkInterface.ts +++ b/test/batchedNetworkInterface.ts @@ -19,7 +19,7 @@ import { AfterwareInterface } from '../src/transport/afterware'; import { GraphQLResult } from 'graphql'; -import 'whatwg-fetch'; +import 'isomorphic-fetch'; import gql from 'graphql-tag'; diff --git a/test/mocks/mockFetch.ts b/test/mocks/mockFetch.ts index 08c0361f081..a86faf30036 100644 --- a/test/mocks/mockFetch.ts +++ b/test/mocks/mockFetch.ts @@ -1,7 +1,7 @@ -import 'whatwg-fetch'; +import 'isomorphic-fetch'; -// This is an implementation of a mocked window.fetch implementation similar in -// structure to the MockedNetworkInterface. +// This is an implementation of a mocked window.fetch/global.fetch implementation +// similar in structure to the MockedNetworkInterface. export interface MockedIResponse { json(): Promise;