@graphql-tools/federation 4.0.2 → 4.0.3-alpha-b8f6f2ed7bc7a0c7c50b19fd5a9ee713b34d7263
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 +7 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @graphql-tools/federation
|
|
2
2
|
|
|
3
|
+
## 4.0.3-alpha-b8f6f2ed7bc7a0c7c50b19fd5a9ee713b34d7263
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#1522](https://github.com/graphql-hive/gateway/pull/1522) [`e64a4e1`](https://github.com/graphql-hive/gateway/commit/e64a4e11db66be8bd9c3728eca1ac3d7d97c7d0e) Thanks [@ardatan](https://github.com/ardatan)! - Revert an extra memoization
|
|
9
|
+
|
|
3
10
|
## 4.0.2
|
|
4
11
|
### Patch Changes
|
|
5
12
|
|
package/dist/index.cjs
CHANGED
|
@@ -105,7 +105,7 @@ function getKeyFnForFederation(typeName, keys) {
|
|
|
105
105
|
}
|
|
106
106
|
const allKeyProps = keys.flatMap((key) => key.trim().split(" ")).map((key) => key.trim());
|
|
107
107
|
if (allKeyProps.length > 1) {
|
|
108
|
-
return
|
|
108
|
+
return function keyFn(root) {
|
|
109
109
|
if (root == null) {
|
|
110
110
|
return null;
|
|
111
111
|
}
|
|
@@ -118,7 +118,7 @@ function getKeyFnForFederation(typeName, keys) {
|
|
|
118
118
|
},
|
|
119
119
|
{ __typename: typeName }
|
|
120
120
|
);
|
|
121
|
-
}
|
|
121
|
+
};
|
|
122
122
|
}
|
|
123
123
|
const keyProp = allKeyProps[0];
|
|
124
124
|
return utils.memoize1(function keyFn(root) {
|
|
@@ -147,7 +147,7 @@ function getCacheKeyFnFromKey(key) {
|
|
|
147
147
|
const keyTrimmed = key.trim();
|
|
148
148
|
const keys = keyTrimmed.split(" ").map((key2) => key2.trim());
|
|
149
149
|
if (keys.length > 1) {
|
|
150
|
-
return
|
|
150
|
+
return function cacheKeyFn(root) {
|
|
151
151
|
let cacheKeyStr = "";
|
|
152
152
|
for (const key2 of keys) {
|
|
153
153
|
const keyVal = root[key2];
|
|
@@ -166,7 +166,7 @@ function getCacheKeyFnFromKey(key) {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
return cacheKeyStr;
|
|
169
|
-
}
|
|
169
|
+
};
|
|
170
170
|
}
|
|
171
171
|
return utils.memoize1(function cacheKeyFn(root) {
|
|
172
172
|
const keyVal = root[keyTrimmed];
|
package/dist/index.js
CHANGED
|
@@ -103,7 +103,7 @@ function getKeyFnForFederation(typeName, keys) {
|
|
|
103
103
|
}
|
|
104
104
|
const allKeyProps = keys.flatMap((key) => key.trim().split(" ")).map((key) => key.trim());
|
|
105
105
|
if (allKeyProps.length > 1) {
|
|
106
|
-
return
|
|
106
|
+
return function keyFn(root) {
|
|
107
107
|
if (root == null) {
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
@@ -116,7 +116,7 @@ function getKeyFnForFederation(typeName, keys) {
|
|
|
116
116
|
},
|
|
117
117
|
{ __typename: typeName }
|
|
118
118
|
);
|
|
119
|
-
}
|
|
119
|
+
};
|
|
120
120
|
}
|
|
121
121
|
const keyProp = allKeyProps[0];
|
|
122
122
|
return memoize1(function keyFn(root) {
|
|
@@ -145,7 +145,7 @@ function getCacheKeyFnFromKey(key) {
|
|
|
145
145
|
const keyTrimmed = key.trim();
|
|
146
146
|
const keys = keyTrimmed.split(" ").map((key2) => key2.trim());
|
|
147
147
|
if (keys.length > 1) {
|
|
148
|
-
return
|
|
148
|
+
return function cacheKeyFn(root) {
|
|
149
149
|
let cacheKeyStr = "";
|
|
150
150
|
for (const key2 of keys) {
|
|
151
151
|
const keyVal = root[key2];
|
|
@@ -164,7 +164,7 @@ function getCacheKeyFnFromKey(key) {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
return cacheKeyStr;
|
|
167
|
-
}
|
|
167
|
+
};
|
|
168
168
|
}
|
|
169
169
|
return memoize1(function cacheKeyFn(root) {
|
|
170
170
|
const keyVal = root[keyTrimmed];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/federation",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3-alpha-b8f6f2ed7bc7a0c7c50b19fd5a9ee713b34d7263",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Useful tools to create and manipulate GraphQL schemas.",
|
|
6
6
|
"repository": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@apollo/gateway": "^2.11.2",
|
|
58
|
-
"@apollo/server": "^
|
|
59
|
-
"@apollo/server-gateway-interface": "^
|
|
58
|
+
"@apollo/server": "^5.0.0",
|
|
59
|
+
"@apollo/server-gateway-interface": "^2.0.0",
|
|
60
60
|
"@apollo/subgraph": "^2.11.2",
|
|
61
61
|
"@types/lodash": "4.17.20",
|
|
62
62
|
"graphql": "^16.9.0",
|