@graphql-tools/apollo-engine-loader 7.2.7 → 7.2.8-alpha-586a742a.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/index.mjs +2 -2
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
6
 
7
7
  const utils = require('@graphql-tools/utils');
8
- const crossUndiciFetch = require('cross-undici-fetch');
8
+ const crossUndiciFetch = _interopDefault(require('cross-undici-fetch'));
9
9
  const syncFetch = _interopDefault(require('sync-fetch'));
10
10
 
11
11
  const DEFAULT_APOLLO_ENDPOINT = 'https://engine-graphql.apollographql.com/api/graphql';
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AggregateError, parseGraphQLSDL } from '@graphql-tools/utils';
2
- import { fetch } from 'cross-undici-fetch';
2
+ import crossUndiciFetch from 'cross-undici-fetch';
3
3
  import syncFetch from 'sync-fetch';
4
4
 
5
5
  const DEFAULT_APOLLO_ENDPOINT = 'https://engine-graphql.apollographql.com/api/graphql';
@@ -42,7 +42,7 @@ class ApolloEngineLoader {
42
42
  return [];
43
43
  }
44
44
  const fetchArgs = this.getFetchArgs(options);
45
- const response = await fetch(...fetchArgs);
45
+ const response = await crossUndiciFetch.fetch(...fetchArgs);
46
46
  const { data, errors } = await response.json();
47
47
  if (errors) {
48
48
  throw new AggregateError(errors, 'Introspection from Apollo Engine failed; \n ' + errors.map((e) => e.message).join('\n'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/apollo-engine-loader",
3
- "version": "7.2.7",
3
+ "version": "7.2.8-alpha-586a742a.0",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@graphql-tools/utils": "8.6.6",
11
- "cross-undici-fetch": "^0.1.19",
11
+ "cross-undici-fetch": "^0.2.0",
12
12
  "sync-fetch": "0.3.1",
13
13
  "tslib": "~2.3.0"
14
14
  },