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

@graphql-tools/executor-graphql-ws

Package Overview
Dependencies
Maintainers
4
Versions
437
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.3.7-alpha-73dbe3a2dabb6b84105c4dac3586696daa3d4fcb to 1.3.7-alpha-ac6c8c67fde93023c5b5862e75394afa17284bf2

35

CHANGELOG.md
# @graphql-tools/executor-graphql-ws
## 1.3.7-alpha-73dbe3a2dabb6b84105c4dac3586696daa3d4fcb
## 1.3.7-alpha-ac6c8c67fde93023c5b5862e75394afa17284bf2
### Patch Changes
- [#381](https://github.com/graphql-hive/gateway/pull/381) [`73dbe3a`](https://github.com/graphql-hive/gateway/commit/73dbe3a2dabb6b84105c4dac3586696daa3d4fcb) Thanks [@ardatan](https://github.com/ardatan)! - Like HMAC Upstream Signature plugin, different components of the gateway were using different ways of serializing the execution request.
- [#381](https://github.com/graphql-hive/gateway/pull/381) [`55eb1b4`](https://github.com/graphql-hive/gateway/commit/55eb1b4d14aec7b3e6c7bcf9f596bc01192d022c) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Added dependency [`@graphql-tools/executor-common@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor-common/v/workspace:^) (to `dependencies`)
- [#381](https://github.com/graphql-hive/gateway/pull/381) [`55eb1b4`](https://github.com/graphql-hive/gateway/commit/55eb1b4d14aec7b3e6c7bcf9f596bc01192d022c) Thanks [@ardatan](https://github.com/ardatan)! - This is a bugfix with some internal changes, no user action is needed. This bugfix and improvement is done to improve the stability of some components of the gateway;
Like HMAC Upstream Signature plugin, different components of the gateway were using different ways of serializing the execution request.
Some of them were ignoring `variables` if it is empty, some of not, this was causing the signature generation to be different for the same query.

@@ -13,2 +19,27 @@ For example, it was working as expected in Proxy mode, but not working as expected in Federation Gateway mode.

For example instead of using `print`, you should use `defaultPrintFn` that memoizes `print` operation and also used the string version of it parsed before by Envelop/Yoga.
```diff
-import { print } from 'graphql';
-const query = print(parsedQuery);
+import { defaultPrintFn } from '@graphql-tools/executor-common';
+const query = defaultPrintFn(parsedQuery);
```
Or instead of creating objects from `ExecutionRequest`, use `serializeExecutionRequest` helper.
```diff
-const serializedRequest = {
- query: print(executionRequest.document),
- variables: executionRequest.variables,
- operationName: executionRequest.operationName,
- extensions: executionRequest.extensions,
-};
+import { serializeExecutionRequest } from '@graphql-tools/executor-common';
+const serializedRequest = serializeExecutionRequest(executionRequest);
```
- Updated dependencies [[`55eb1b4`](https://github.com/graphql-hive/gateway/commit/55eb1b4d14aec7b3e6c7bcf9f596bc01192d022c)]:
- @graphql-tools/executor-common@0.0.1-alpha-ac6c8c67fde93023c5b5862e75394afa17284bf2
## 1.3.6

@@ -15,0 +46,0 @@

4

dist/index.js

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

import { executionRequestToGraphQLParams, defaultPrintFn } from '@graphql-tools/executor-common';
import { serializeExecutionRequest, defaultPrintFn } from '@graphql-tools/executor-common';
import { getOperationASTFromRequest, registerAbortSignalListener } from '@graphql-tools/utils';

@@ -54,3 +54,3 @@ import { DisposableSymbols } from '@whatwg-node/disposablestack';

const iterableIterator = graphqlWSClient.iterate(
executionRequestToGraphQLParams({ executionRequest, printFn })
serializeExecutionRequest({ executionRequest, printFn })
);

@@ -57,0 +57,0 @@ if (iterableIterator.return && signal) {

{
"name": "@graphql-tools/executor-graphql-ws",
"version": "1.3.7-alpha-73dbe3a2dabb6b84105c4dac3586696daa3d4fcb",
"version": "1.3.7-alpha-ac6c8c67fde93023c5b5862e75394afa17284bf2",
"type": "module",

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

"dependencies": {
"@graphql-tools/executor-common": "^0.0.0",
"@graphql-tools/executor-common": "0.0.1-alpha-ac6c8c67fde93023c5b5862e75394afa17284bf2",
"@graphql-tools/utils": "^10.7.0",

@@ -45,0 +45,0 @@ "@whatwg-node/disposablestack": "^0.0.5",

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