@graphql-hive/router-runtime 1.1.0-alpha-818c8406fd595e3e7774079d54f09027720344b3 → 1.1.0-alpha-e23b844282b3244e6da4dc25307e1bdb5e3aeb88
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 +11 -6
- package/dist/index.cjs +2 -4
- package/dist/index.js +3 -5
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
# @graphql-hive/router-runtime
|
|
2
2
|
|
|
3
|
-
## 1.1.0-alpha-
|
|
3
|
+
## 1.1.0-alpha-e23b844282b3244e6da4dc25307e1bdb5e3aeb88
|
|
4
4
|
### Minor Changes
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
- [#1708](https://github.com/graphql-hive/gateway/pull/1708) [`
|
|
8
|
+
- [#1708](https://github.com/graphql-hive/gateway/pull/1708) [`2ea1b7c`](https://github.com/graphql-hive/gateway/commit/2ea1b7cdd3086d6785f473b290b4ea1e13e49649) Thanks [@ardatan](https://github.com/ardatan)! - Support Stitching transforms (w/ Mesh directives)
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
### Patch Changes
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
- [#
|
|
15
|
+
- [#1727](https://github.com/graphql-hive/gateway/pull/1727) [`1dbc653`](https://github.com/graphql-hive/gateway/commit/1dbc6536cb992a705cac7894acca6fe5431b72de) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
|
|
16
|
+
|
|
17
|
+
- Updated dependency [`@graphql-hive/router-query-planner@^0.0.4` ↗︎](https://www.npmjs.com/package/@graphql-hive/router-query-planner/v/0.0.4) (from `^0.0.3`, in `dependencies`)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- [#1708](https://github.com/graphql-hive/gateway/pull/1708) [`2ea1b7c`](https://github.com/graphql-hive/gateway/commit/2ea1b7cdd3086d6785f473b290b4ea1e13e49649) Thanks [@ardatan](https://github.com/ardatan)! - Handle listed enum values correctly
|
|
16
21
|
Previously when a field like `[MyEnum!]!` is projected, it was projecting it like it is `MyEnum`.
|
|
17
|
-
- Updated dependencies [[`
|
|
18
|
-
- @graphql-mesh/fusion-runtime@1.6.0-alpha-
|
|
19
|
-
- @graphql-tools/federation@4.2.4-alpha-
|
|
22
|
+
- Updated dependencies [[`2ea1b7c`](https://github.com/graphql-hive/gateway/commit/2ea1b7cdd3086d6785f473b290b4ea1e13e49649)]:
|
|
23
|
+
- @graphql-mesh/fusion-runtime@1.6.0-alpha-e23b844282b3244e6da4dc25307e1bdb5e3aeb88
|
|
24
|
+
- @graphql-tools/federation@4.2.4-alpha-e23b844282b3244e6da4dc25307e1bdb5e3aeb88
|
|
20
25
|
|
|
21
26
|
## 1.0.1
|
|
22
27
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -888,10 +888,6 @@ function projectSelectionSet(data, selectionSet, type, executionContext) {
|
|
|
888
888
|
const enumValue = enumType.getValue(value);
|
|
889
889
|
if (enumValue == null) {
|
|
890
890
|
return null;
|
|
891
|
-
} else if (enumValue.astNode?.directives?.find(
|
|
892
|
-
(directive) => directive.name.value === "inaccessible"
|
|
893
|
-
)) {
|
|
894
|
-
return null;
|
|
895
891
|
}
|
|
896
892
|
return value;
|
|
897
893
|
};
|
|
@@ -910,6 +906,8 @@ function projectSelectionSet(data, selectionSet, type, executionContext) {
|
|
|
910
906
|
}
|
|
911
907
|
} else if (field.name === "__typename") {
|
|
912
908
|
result[responseKey] = type.name;
|
|
909
|
+
} else if (graphql.isNonNullType(field.type)) {
|
|
910
|
+
return null;
|
|
913
911
|
} else {
|
|
914
912
|
result[responseKey] = null;
|
|
915
913
|
}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { defaultPrintFn } from '@graphql-tools/executor-common';
|
|
|
4
4
|
import { filterInternalFieldsAndTypes } from '@graphql-tools/federation';
|
|
5
5
|
import { isAsyncIterable, getOperationASTFromRequest, memoize1, mergeDeep, getOperationASTFromDocument, relocatedError } from '@graphql-tools/utils';
|
|
6
6
|
import { handleMaybePromise, mapAsyncIterator, isPromise } from '@whatwg-node/promise-helpers';
|
|
7
|
-
import { isObjectType, isAbstractType, Kind, parse, isInterfaceType, TypeNameMetaFieldDef, getNamedType, isEnumType, isOutputType, visit, BREAK } from 'graphql';
|
|
7
|
+
import { isObjectType, isAbstractType, Kind, parse, isInterfaceType, TypeNameMetaFieldDef, getNamedType, isEnumType, isNonNullType, isOutputType, visit, BREAK } from 'graphql';
|
|
8
8
|
import { documentStringMap } from '@envelop/core';
|
|
9
9
|
import { getFragmentsFromDocument, getVariableValues } from '@graphql-tools/executor';
|
|
10
10
|
|
|
@@ -886,10 +886,6 @@ function projectSelectionSet(data, selectionSet, type, executionContext) {
|
|
|
886
886
|
const enumValue = enumType.getValue(value);
|
|
887
887
|
if (enumValue == null) {
|
|
888
888
|
return null;
|
|
889
|
-
} else if (enumValue.astNode?.directives?.find(
|
|
890
|
-
(directive) => directive.name.value === "inaccessible"
|
|
891
|
-
)) {
|
|
892
|
-
return null;
|
|
893
889
|
}
|
|
894
890
|
return value;
|
|
895
891
|
};
|
|
@@ -908,6 +904,8 @@ function projectSelectionSet(data, selectionSet, type, executionContext) {
|
|
|
908
904
|
}
|
|
909
905
|
} else if (field.name === "__typename") {
|
|
910
906
|
result[responseKey] = type.name;
|
|
907
|
+
} else if (isNonNullType(field.type)) {
|
|
908
|
+
return null;
|
|
911
909
|
} else {
|
|
912
910
|
result[responseKey] = null;
|
|
913
911
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-hive/router-runtime",
|
|
3
|
-
"version": "1.1.0-alpha-
|
|
3
|
+
"version": "1.1.0-alpha-e23b844282b3244e6da4dc25307e1bdb5e3aeb88",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@envelop/core": "^5.4.0",
|
|
46
|
-
"@graphql-hive/router-query-planner": "^0.0.
|
|
47
|
-
"@graphql-mesh/fusion-runtime": "1.6.0-alpha-
|
|
46
|
+
"@graphql-hive/router-query-planner": "^0.0.4",
|
|
47
|
+
"@graphql-mesh/fusion-runtime": "1.6.0-alpha-e23b844282b3244e6da4dc25307e1bdb5e3aeb88",
|
|
48
48
|
"@graphql-mesh/transport-common": "^1.0.12",
|
|
49
49
|
"@graphql-tools/executor": "^1.4.13",
|
|
50
50
|
"@graphql-tools/executor-common": "^1.0.5",
|
|
51
|
-
"@graphql-tools/federation": "4.2.4-alpha-
|
|
51
|
+
"@graphql-tools/federation": "4.2.4-alpha-e23b844282b3244e6da4dc25307e1bdb5e3aeb88",
|
|
52
52
|
"@graphql-tools/utils": "^10.10.3",
|
|
53
53
|
"@whatwg-node/promise-helpers": "^1.3.2"
|
|
54
54
|
},
|