Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/executor-http

Package Overview
Dependencies
Maintainers
4
Versions
424
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/executor-http - npm Package Compare versions

Comparing version 1.1.10-alpha-1286435a05cf1320fa23c1318e5140636a523809 to 1.1.10-alpha-1426f4a3bc3283dbdf50cbfda653251a83f2767e

2

CHANGELOG.md
# @graphql-tools/executor-http
## 1.1.10-alpha-1286435a05cf1320fa23c1318e5140636a523809
## 1.1.10-alpha-1426f4a3bc3283dbdf50cbfda653251a83f2767e

@@ -5,0 +5,0 @@ ### Patch Changes

@@ -1,2 +0,2 @@

import { isAsyncIterable, isPromise, fakePromise, inspect, mapAsyncIterator, mergeIncrementalResult, memoize1, getOperationASTFromRequest, createGraphQLError } from '@graphql-tools/utils';
import { isAsyncIterable, isPromise, fakePromise, inspect, mapAsyncIterator, mergeIncrementalResult, memoize1, getOperationASTFromRequest, mapMaybePromise, createGraphQLError } from '@graphql-tools/utils';
import { File, FormData, TextDecoder, fetch } from '@whatwg-node/fetch';

@@ -91,7 +91,14 @@ import { ValueOrPromise } from 'value-or-promise';

}
return ValueOrPromise.all(
uploads.map(
(upload, i) => new ValueOrPromise(() => handleUpload(upload, i))
)
).then(() => form).resolve();
const jobs = [];
for (const i in uploads) {
const upload = uploads[i];
const job = handleUpload(upload, Number(i));
if (isPromise(job)) {
jobs.push(job);
}
}
if (jobs.length > 0) {
return Promise.all(jobs).then(() => form);
}
return form;
}

@@ -318,28 +325,29 @@ function isBlob(obj) {

upstreamErrorExtensions.request.body = body;
return new ValueOrPromise(
() => createFormDataFromVariables(body, {
return mapMaybePromise(
createFormDataFromVariables(body, {
File: options?.File,
FormData: options?.FormData
})
).then((body2) => {
if (typeof body2 === "string" && !headers["content-type"]) {
upstreamErrorExtensions.request.body = body2;
headers["content-type"] = "application/json";
}),
(body2) => {
if (typeof body2 === "string" && !headers["content-type"]) {
upstreamErrorExtensions.request.body = body2;
headers["content-type"] = "application/json";
}
const fetchOptions = {
method: "POST",
body: body2,
headers,
signal
};
if (options?.credentials != null) {
fetchOptions.credentials = options.credentials;
}
return fetchFn(
endpoint,
fetchOptions,
request.context,
request.info
);
}
const fetchOptions = {
method: "POST",
body: body2,
headers,
signal
};
if (options?.credentials != null) {
fetchOptions.credentials = options.credentials;
}
return fetchFn(
endpoint,
fetchOptions,
request.context,
request.info
);
}).resolve();
);
}

@@ -463,3 +471,3 @@ }

}
return new ValueOrPromise(() => baseExecutor(request)).then((res) => {
return mapMaybePromise(baseExecutor(request), (res) => {
result = res;

@@ -470,3 +478,3 @@ if (result?.errors?.length) {

return result;
}).resolve();
});
}

@@ -473,0 +481,0 @@ return retryAttempt();

{
"name": "@graphql-tools/executor-http",
"version": "1.1.10-alpha-1286435a05cf1320fa23c1318e5140636a523809",
"version": "1.1.10-alpha-1426f4a3bc3283dbdf50cbfda653251a83f2767e",
"type": "module",

@@ -5,0 +5,0 @@ "description": "A set of utils for faster development of GraphQL tools",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc