@graphql-tools/url-loader 7.13.9 → 7.14.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.
package/cjs/index.js CHANGED
@@ -204,7 +204,7 @@ class UrlLoader {
204
204
  ...(credentials != null ? { credentials } : {}),
205
205
  headers,
206
206
  signal: controller === null || controller === void 0 ? void 0 : controller.signal,
207
- });
207
+ }, request.context, request.info);
208
208
  case 'POST':
209
209
  if (options === null || options === void 0 ? void 0 : options.multipart) {
210
210
  return new value_or_promise_1.ValueOrPromise(() => this.createFormDataFromVariables(requestBody))
@@ -217,7 +217,7 @@ class UrlLoader {
217
217
  ...(typeof body === 'string' ? { 'content-type': 'application/json' } : {}),
218
218
  },
219
219
  signal: controller === null || controller === void 0 ? void 0 : controller.signal,
220
- }))
220
+ }, request.context, request.info))
221
221
  .resolve();
222
222
  }
223
223
  else {
@@ -230,7 +230,7 @@ class UrlLoader {
230
230
  ...headers,
231
231
  },
232
232
  signal: controller === null || controller === void 0 ? void 0 : controller.signal,
233
- });
233
+ }, request.context, request.info);
234
234
  }
235
235
  }
236
236
  })
package/esm/index.js CHANGED
@@ -200,7 +200,7 @@ export class UrlLoader {
200
200
  ...(credentials != null ? { credentials } : {}),
201
201
  headers,
202
202
  signal: controller === null || controller === void 0 ? void 0 : controller.signal,
203
- });
203
+ }, request.context, request.info);
204
204
  case 'POST':
205
205
  if (options === null || options === void 0 ? void 0 : options.multipart) {
206
206
  return new ValueOrPromise(() => this.createFormDataFromVariables(requestBody))
@@ -213,7 +213,7 @@ export class UrlLoader {
213
213
  ...(typeof body === 'string' ? { 'content-type': 'application/json' } : {}),
214
214
  },
215
215
  signal: controller === null || controller === void 0 ? void 0 : controller.signal,
216
- }))
216
+ }, request.context, request.info))
217
217
  .resolve();
218
218
  }
219
219
  else {
@@ -226,7 +226,7 @@ export class UrlLoader {
226
226
  ...headers,
227
227
  },
228
228
  signal: controller === null || controller === void 0 ? void 0 : controller.signal,
229
- });
229
+ }, request.context, request.info);
230
230
  }
231
231
  }
232
232
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/url-loader",
3
- "version": "7.13.9",
3
+ "version": "7.14.0",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -1,3 +1,3 @@
1
- import { fetch } from '@whatwg-node/fetch';
2
- export declare type AsyncFetchFn = typeof fetch;
1
+ import { GraphQLResolveInfo } from 'graphql';
2
+ export declare type AsyncFetchFn = (url: string, options?: RequestInit, context?: any, info?: GraphQLResolveInfo) => Promise<Response>;
3
3
  export declare const defaultAsyncFetch: AsyncFetchFn;
@@ -1,3 +1,3 @@
1
- import { fetch } from '@whatwg-node/fetch';
2
- export declare type AsyncFetchFn = typeof fetch;
1
+ import { GraphQLResolveInfo } from 'graphql';
2
+ export declare type AsyncFetchFn = (url: string, options?: RequestInit, context?: any, info?: GraphQLResolveInfo) => Promise<Response>;
3
3
  export declare const defaultAsyncFetch: AsyncFetchFn;
@@ -1,5 +1,6 @@
1
+ import { GraphQLResolveInfo } from 'graphql';
1
2
  export declare const defaultSyncFetch: SyncFetchFn;
2
- export declare type SyncFetchFn = (input: RequestInfo, init?: RequestInit) => SyncResponse;
3
+ export declare type SyncFetchFn = (url: string, init?: RequestInit, context?: any, info?: GraphQLResolveInfo) => SyncResponse;
3
4
  export declare type SyncResponse = Omit<Response, 'json' | 'text'> & {
4
5
  json: () => any;
5
6
  text: () => string;
@@ -1,5 +1,6 @@
1
+ import { GraphQLResolveInfo } from 'graphql';
1
2
  export declare const defaultSyncFetch: SyncFetchFn;
2
- export declare type SyncFetchFn = (input: RequestInfo, init?: RequestInit) => SyncResponse;
3
+ export declare type SyncFetchFn = (url: string, init?: RequestInit, context?: any, info?: GraphQLResolveInfo) => SyncResponse;
3
4
  export declare type SyncResponse = Omit<Response, 'json' | 'text'> & {
4
5
  json: () => any;
5
6
  text: () => string;