@graphql-tools/url-loader 7.9.1 → 7.9.4

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 +3 -3
  2. package/index.mjs +3 -3
  3. package/package.json +4 -4
package/index.js CHANGED
@@ -418,7 +418,7 @@ class UrlLoader {
418
418
  method = 'GET';
419
419
  }
420
420
  }
421
- const endpoint = ((_a = request.extensions) === null || _a === void 0 ? void 0 : _a.endpoint) || initialEndpoint;
421
+ const endpoint = ((_a = request.extensions) === null || _a === void 0 ? void 0 : _a.endpoint) || HTTP_URL;
422
422
  const headers = Object.assign({}, options === null || options === void 0 ? void 0 : options.headers, ((_b = request.extensions) === null || _b === void 0 ? void 0 : _b.headers) || {});
423
423
  const acceptedProtocols = [`application/json`];
424
424
  if (method === 'GET' && (options === null || options === void 0 ? void 0 : options.subscriptionsProtocol) === exports.SubscriptionProtocol.SSE) {
@@ -463,7 +463,7 @@ class UrlLoader {
463
463
  case 'POST':
464
464
  if (options === null || options === void 0 ? void 0 : options.multipart) {
465
465
  return new valueOrPromise.ValueOrPromise(() => this.createFormDataFromVariables(requestBody))
466
- .then(form => fetch(HTTP_URL, {
466
+ .then(form => fetch(endpoint, {
467
467
  method: 'POST',
468
468
  credentials,
469
469
  body: form,
@@ -476,7 +476,7 @@ class UrlLoader {
476
476
  .resolve();
477
477
  }
478
478
  else {
479
- return fetch(HTTP_URL, {
479
+ return fetch(endpoint, {
480
480
  method: 'POST',
481
481
  credentials,
482
482
  body: JSON.stringify(requestBody),
package/index.mjs CHANGED
@@ -394,7 +394,7 @@ class UrlLoader {
394
394
  method = 'GET';
395
395
  }
396
396
  }
397
- const endpoint = ((_a = request.extensions) === null || _a === void 0 ? void 0 : _a.endpoint) || initialEndpoint;
397
+ const endpoint = ((_a = request.extensions) === null || _a === void 0 ? void 0 : _a.endpoint) || HTTP_URL;
398
398
  const headers = Object.assign({}, options === null || options === void 0 ? void 0 : options.headers, ((_b = request.extensions) === null || _b === void 0 ? void 0 : _b.headers) || {});
399
399
  const acceptedProtocols = [`application/json`];
400
400
  if (method === 'GET' && (options === null || options === void 0 ? void 0 : options.subscriptionsProtocol) === SubscriptionProtocol.SSE) {
@@ -439,7 +439,7 @@ class UrlLoader {
439
439
  case 'POST':
440
440
  if (options === null || options === void 0 ? void 0 : options.multipart) {
441
441
  return new ValueOrPromise(() => this.createFormDataFromVariables(requestBody))
442
- .then(form => fetch(HTTP_URL, {
442
+ .then(form => fetch(endpoint, {
443
443
  method: 'POST',
444
444
  credentials,
445
445
  body: form,
@@ -452,7 +452,7 @@ class UrlLoader {
452
452
  .resolve();
453
453
  }
454
454
  else {
455
- return fetch(HTTP_URL, {
455
+ return fetch(endpoint, {
456
456
  method: 'POST',
457
457
  credentials,
458
458
  body: JSON.stringify(requestBody),
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@graphql-tools/url-loader",
3
- "version": "7.9.1",
3
+ "version": "7.9.4",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-tools/delegate": "^8.5.1",
11
- "@graphql-tools/utils": "^8.6.2",
12
- "@graphql-tools/wrap": "^8.4.2",
10
+ "@graphql-tools/delegate": "8.5.4",
11
+ "@graphql-tools/utils": "8.6.3",
12
+ "@graphql-tools/wrap": "8.4.6",
13
13
  "@n1ru4l/graphql-live-query": "^0.9.0",
14
14
  "@types/websocket": "^1.0.4",
15
15
  "@types/ws": "^8.0.0",