@graphql-tools/delegate 12.3.5 → 12.3.6-alpha-2f3a82afbb4d408e93a8cd39a31f58f7e5c99831
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/CHANGELOG.md +9 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @graphql-tools/delegate
|
|
2
2
|
|
|
3
|
+
## 12.3.6-alpha-2f3a82afbb4d408e93a8cd39a31f58f7e5c99831
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#2781](https://github.com/graphql-hive/gateway/pull/2781) [`2f3a82a`](https://github.com/graphql-hive/gateway/commit/2f3a82afbb4d408e93a8cd39a31f58f7e5c99831) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Only follow own properties when merging forwarded deferred patches
|
|
9
|
+
|
|
10
|
+
Deferred patch paths are made of client response keys, so merging them into the result tree only considers properties the tree actually owns. Aliases matching built-in object members, like `hasOwnProperty`, are merged like any other response key.
|
|
11
|
+
|
|
3
12
|
## 12.3.5
|
|
4
13
|
### Patch Changes
|
|
5
14
|
|
package/dist/index.cjs
CHANGED
|
@@ -4634,7 +4634,7 @@ function setObjectKeyPath(obj, path, value) {
|
|
|
4634
4634
|
if (key == null || key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
4635
4635
|
return;
|
|
4636
4636
|
}
|
|
4637
|
-
if (current[key] == null) {
|
|
4637
|
+
if (!Object.prototype.hasOwnProperty.call(current, key) || current[key] == null) {
|
|
4638
4638
|
current[key] = typeof path[i + 1] === "number" ? [] : {};
|
|
4639
4639
|
}
|
|
4640
4640
|
current = current[key];
|
|
@@ -4643,7 +4643,7 @@ function setObjectKeyPath(obj, path, value) {
|
|
|
4643
4643
|
if (lastKey == null || lastKey === "__proto__" || lastKey === "constructor" || lastKey === "prototype") {
|
|
4644
4644
|
return;
|
|
4645
4645
|
}
|
|
4646
|
-
const existingValue = current[lastKey];
|
|
4646
|
+
const existingValue = Object.prototype.hasOwnProperty.call(current, lastKey) ? current[lastKey] : void 0;
|
|
4647
4647
|
current[lastKey] = existingValue ? utils.mergeDeep([existingValue, value]) : value;
|
|
4648
4648
|
}
|
|
4649
4649
|
|
package/dist/index.js
CHANGED
|
@@ -4634,7 +4634,7 @@ function setObjectKeyPath(obj, path, value) {
|
|
|
4634
4634
|
if (key == null || key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
4635
4635
|
return;
|
|
4636
4636
|
}
|
|
4637
|
-
if (current[key] == null) {
|
|
4637
|
+
if (!Object.prototype.hasOwnProperty.call(current, key) || current[key] == null) {
|
|
4638
4638
|
current[key] = typeof path[i + 1] === "number" ? [] : {};
|
|
4639
4639
|
}
|
|
4640
4640
|
current = current[key];
|
|
@@ -4643,7 +4643,7 @@ function setObjectKeyPath(obj, path, value) {
|
|
|
4643
4643
|
if (lastKey == null || lastKey === "__proto__" || lastKey === "constructor" || lastKey === "prototype") {
|
|
4644
4644
|
return;
|
|
4645
4645
|
}
|
|
4646
|
-
const existingValue = current[lastKey];
|
|
4646
|
+
const existingValue = Object.prototype.hasOwnProperty.call(current, lastKey) ? current[lastKey] : void 0;
|
|
4647
4647
|
current[lastKey] = existingValue ? mergeDeep([existingValue, value]) : value;
|
|
4648
4648
|
}
|
|
4649
4649
|
|
package/package.json
CHANGED