@graphql-tools/delegate 10.2.4 → 10.2.5-alpha-ee138f448a4da4c3c85d44f40602a40fc6336032
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 +6 -0
- package/dist/index.cjs +10 -1
- package/dist/index.js +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @graphql-tools/delegate
|
|
2
2
|
|
|
3
|
+
## 10.2.5-alpha-ee138f448a4da4c3c85d44f40602a40fc6336032
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#257](https://github.com/graphql-hive/gateway/pull/257) [`ee138f4`](https://github.com/graphql-hive/gateway/commit/ee138f448a4da4c3c85d44f40602a40fc6336032) Thanks [@ardatan](https://github.com/ardatan)! - Do not show internal non-nullability errors in the gateway
|
|
8
|
+
|
|
3
9
|
## 10.2.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -138,7 +138,16 @@ function handleResolverResult(resolverResult, subschema, selectionSet, object, c
|
|
|
138
138
|
for (const [responseKey, fieldNodes] of fields) {
|
|
139
139
|
const combinedPath = [...path, responseKey];
|
|
140
140
|
if (resolverResult instanceof graphql.GraphQLError) {
|
|
141
|
-
|
|
141
|
+
if (resolverResult.message.includes(
|
|
142
|
+
"Cannot return null for non-nullable field"
|
|
143
|
+
)) {
|
|
144
|
+
nullResult[responseKey] = null;
|
|
145
|
+
} else {
|
|
146
|
+
nullResult[responseKey] = utils.relocatedError(
|
|
147
|
+
resolverResult,
|
|
148
|
+
combinedPath
|
|
149
|
+
);
|
|
150
|
+
}
|
|
142
151
|
} else if (resolverResult instanceof Error) {
|
|
143
152
|
nullResult[responseKey] = graphql.locatedError(
|
|
144
153
|
resolverResult,
|
package/dist/index.js
CHANGED
|
@@ -137,7 +137,16 @@ function handleResolverResult(resolverResult, subschema, selectionSet, object, c
|
|
|
137
137
|
for (const [responseKey, fieldNodes] of fields) {
|
|
138
138
|
const combinedPath = [...path, responseKey];
|
|
139
139
|
if (resolverResult instanceof GraphQLError) {
|
|
140
|
-
|
|
140
|
+
if (resolverResult.message.includes(
|
|
141
|
+
"Cannot return null for non-nullable field"
|
|
142
|
+
)) {
|
|
143
|
+
nullResult[responseKey] = null;
|
|
144
|
+
} else {
|
|
145
|
+
nullResult[responseKey] = relocatedError(
|
|
146
|
+
resolverResult,
|
|
147
|
+
combinedPath
|
|
148
|
+
);
|
|
149
|
+
}
|
|
141
150
|
} else if (resolverResult instanceof Error) {
|
|
142
151
|
nullResult[responseKey] = locatedError(
|
|
143
152
|
resolverResult,
|
package/package.json
CHANGED