graphql-stitch
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -179,8 +179,4 @@ require("source-map-support").install(); | ||
var _apolloLink = __webpack_require__(5); | ||
var _nodeFetch = __webpack_require__(5); | ||
var _apolloLinkRetry = __webpack_require__(6); | ||
var _nodeFetch = __webpack_require__(7); | ||
var _nodeFetch2 = _interopRequireDefault(_nodeFetch); | ||
@@ -193,11 +189,8 @@ | ||
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } | ||
// import { ApolloLink } from 'apollo-link'; | ||
// import { RetryLink } from "apollo-link-retry"; | ||
function defaultLink(uri) { | ||
return _apolloLink.ApolloLink.from([new _apolloLinkRetry.RetryLink({ | ||
max: 6, | ||
delay: 300, | ||
interval: function interval(delay, count) { | ||
return count * count * delay; | ||
} | ||
}), new _apolloLinkHttp.HttpLink({ uri: uri, fetch: _nodeFetch2.default })]); | ||
return new _apolloLinkHttp.HttpLink({ uri: uri, fetch: _nodeFetch2.default }); | ||
}; | ||
@@ -221,14 +214,2 @@ | ||
module.exports = require("apollo-link"); | ||
/***/ }), | ||
/* 6 */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("apollo-link-retry"); | ||
/***/ }), | ||
/* 7 */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("node-fetch"); | ||
@@ -235,0 +216,0 @@ |
{ | ||
"name": "graphql-stitch", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "inspect and stitch remote graphql schemas with local ones", | ||
@@ -5,0 +5,0 @@ "main": "dist/bundle.js", |
import { makeRemoteExecutableSchema, mergeSchemas, introspectSchema } from 'graphql-tools'; | ||
import { HttpLink } from 'apollo-link-http'; | ||
import { ApolloLink } from 'apollo-link'; | ||
import { RetryLink } from "apollo-link-retry"; | ||
// import { ApolloLink } from 'apollo-link'; | ||
// import { RetryLink } from "apollo-link-retry"; | ||
import fetch from 'node-fetch'; | ||
function defaultLink(uri) { | ||
return ApolloLink.from([ | ||
new RetryLink({ | ||
max: 6, | ||
delay: 300, | ||
interval: (delay, count) => count * count * delay, | ||
}), | ||
new HttpLink({ uri, fetch }), | ||
]); | ||
return new HttpLink({ uri, fetch }); | ||
}; | ||
@@ -18,0 +11,0 @@ |
@@ -19,3 +19,3 @@ | ||
const { data, errors } = await graphql(schema, query, {}); | ||
const { data, errors } = await graphql(schema, query); | ||
@@ -22,0 +22,0 @@ expect(errors).not.to.be.ok; |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1
161007
274