New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/executor-http

Package Overview
Dependencies
Maintainers
4
Versions
589
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.2.4 to 1.2.5-alpha-09b31c8104f4c0b9d87e30144cf822c5ffd19740

11

CHANGELOG.md
# @graphql-tools/executor-http
## 1.2.5-alpha-09b31c8104f4c0b9d87e30144cf822c5ffd19740
### Patch Changes
- [#420](https://github.com/graphql-hive/gateway/pull/420) [`82cc7d6`](https://github.com/graphql-hive/gateway/commit/82cc7d6d2b2c6689f0436a1bef299f0462959581) Thanks [@ardatan](https://github.com/ardatan)! - - In case of schema reload, throw `SCHEMA_RELOAD` error while recreating the transports and executors
- In case of shut down, throw `SHUTTING_DOWN` error while cleaning the transports and executors up
Previously, these errors are only thrown for subscriptions not it is thrown in other type of operations as well.
And previously the thrown errors during these two cleanup and restart process were cryptic, now the mentioned two errors above are thrown with more clear messages
## 1.2.4

@@ -4,0 +15,0 @@

4

dist/index.d.ts

@@ -82,2 +82,6 @@ import { ExecutionRequest, DisposableSyncExecutor, DisposableAsyncExecutor } from '@graphql-tools/utils';

disposable?: boolean;
/**
* On dispose abort error
*/
getDisposeReason?(): Error | undefined;
}

@@ -84,0 +88,0 @@ type HeadersConfig = Record<string, string>;

20

dist/index.js

@@ -123,5 +123,2 @@ import { abortSignalAny } from '@graphql-hive/gateway-abort-signal-any';

function createAbortErrorReason() {
return new Error("Executor was disposed.");
}
function createGraphQLErrorForAbort(reason, extensions) {

@@ -133,7 +130,14 @@ if (reason instanceof GraphQLError) {

return createGraphQLError(reason.message, {
extensions,
extensions: {
http: {
status: 504,
...extensions?.["http"] || {}
},
code: "TIMEOUT_ERROR",
...extensions || {}
},
originalError: reason
});
}
return createGraphQLError("The operation was aborted. reason: " + reason, {
return createGraphQLError(reason.message, {
extensions,

@@ -184,3 +188,3 @@ originalError: reason

if (signal?.aborted) {
await push(createResultForAbort(signal));
await push(createResultForAbort(signal.reason));
return stop();

@@ -586,3 +590,3 @@ }

return function dispose() {
return disposeCtrl.abort(createAbortErrorReason());
return disposeCtrl.abort(options?.getDisposeReason?.());
};

@@ -594,3 +598,3 @@ }

return function asyncDispose() {
return disposeCtrl.abort(createAbortErrorReason());
return disposeCtrl.abort(options?.getDisposeReason?.());
};

@@ -597,0 +601,0 @@ }

{
"name": "@graphql-tools/executor-http",
"version": "1.2.4",
"version": "1.2.5-alpha-09b31c8104f4c0b9d87e30144cf822c5ffd19740",
"type": "module",

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

"graphql-yoga": "^5.10.6",
"pkgroll": "2.6.0"
"pkgroll": "2.6.1"
},
"sideEffects": false
}

Sorry, the diff of this file is not supported yet

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