@graphql-codegen/visitor-plugin-common 7.1.2 → 7.1.3-alpha-20260625140734-1ad8f133387ecf5e348a737d91b1a2e22bcfab4f
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/cjs/selection-set-to-object.js +2 -2
- package/cjs/utils.js +1 -1
- package/esm/selection-set-to-object.js +2 -2
- package/esm/utils.js +1 -1
- package/package.json +4 -4
|
@@ -182,7 +182,7 @@ class SelectionSetToObject {
|
|
|
182
182
|
if (originalNode.kind === graphql_1.Kind.FIELD) {
|
|
183
183
|
return {
|
|
184
184
|
...originalNode,
|
|
185
|
-
fragmentDirectives: [...spread.directives],
|
|
185
|
+
fragmentDirectives: [...(spread.directives || [])],
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
return originalNode;
|
|
@@ -192,7 +192,7 @@ class SelectionSetToObject {
|
|
|
192
192
|
typeName: usage,
|
|
193
193
|
onType: fragmentSpreadObject.onType,
|
|
194
194
|
selectionNodes: fragmentSelectionNodes,
|
|
195
|
-
fragmentDirectives: [...spread.directives],
|
|
195
|
+
fragmentDirectives: [...(spread.directives || [])],
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
}
|
package/cjs/utils.js
CHANGED
|
@@ -540,7 +540,7 @@ const getFieldNames = ({ selections, fieldNames = new Set(), parentName = '', lo
|
|
|
540
540
|
exports.getFieldNames = getFieldNames;
|
|
541
541
|
const getNodeComment = (node) => {
|
|
542
542
|
let commentText = node.description?.value;
|
|
543
|
-
const deprecationDirective = node.directives
|
|
543
|
+
const deprecationDirective = node.directives?.find(v => v.name.value === 'deprecated');
|
|
544
544
|
if (deprecationDirective) {
|
|
545
545
|
const deprecationReason = getDeprecationReason(deprecationDirective);
|
|
546
546
|
commentText = `${commentText ? `${commentText}\n` : ''}@deprecated ${deprecationReason}`;
|
|
@@ -178,7 +178,7 @@ export class SelectionSetToObject {
|
|
|
178
178
|
if (originalNode.kind === Kind.FIELD) {
|
|
179
179
|
return {
|
|
180
180
|
...originalNode,
|
|
181
|
-
fragmentDirectives: [...spread.directives],
|
|
181
|
+
fragmentDirectives: [...(spread.directives || [])],
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
return originalNode;
|
|
@@ -188,7 +188,7 @@ export class SelectionSetToObject {
|
|
|
188
188
|
typeName: usage,
|
|
189
189
|
onType: fragmentSpreadObject.onType,
|
|
190
190
|
selectionNodes: fragmentSelectionNodes,
|
|
191
|
-
fragmentDirectives: [...spread.directives],
|
|
191
|
+
fragmentDirectives: [...(spread.directives || [])],
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
}
|
package/esm/utils.js
CHANGED
|
@@ -510,7 +510,7 @@ export const getFieldNames = ({ selections, fieldNames = new Set(), parentName =
|
|
|
510
510
|
};
|
|
511
511
|
export const getNodeComment = (node) => {
|
|
512
512
|
let commentText = node.description?.value;
|
|
513
|
-
const deprecationDirective = node.directives
|
|
513
|
+
const deprecationDirective = node.directives?.find(v => v.name.value === 'deprecated');
|
|
514
514
|
if (deprecationDirective) {
|
|
515
515
|
const deprecationReason = getDeprecationReason(deprecationDirective);
|
|
516
516
|
commentText = `${commentText ? `${commentText}\n` : ''}@deprecated ${deprecationReason}`;
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/visitor-plugin-common",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.3-alpha-20260625140734-1ad8f133387ecf5e348a737d91b1a2e22bcfab4f",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
5
|
+
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@graphql-tools/optimize": "^2.0.0",
|
|
9
9
|
"@graphql-tools/relay-operation-optimizer": "^7.1.1",
|
|
10
|
-
"@graphql-tools/utils": "
|
|
10
|
+
"@graphql-tools/utils": "11.2.0-alpha-20260623121950-9791cce120fe931141445a7135bb46cf4212582e",
|
|
11
11
|
"auto-bind": "^5.0.0",
|
|
12
12
|
"change-case-all": "^2.1.0",
|
|
13
13
|
"dependency-graph": "^1.0.0",
|
|
14
14
|
"graphql-tag": "^2.11.0",
|
|
15
15
|
"parse-filepath": "^1.0.2",
|
|
16
16
|
"tslib": "^2.8.0",
|
|
17
|
-
"@graphql-codegen/plugin-helpers": "^7.0.
|
|
17
|
+
"@graphql-codegen/plugin-helpers": "^7.0.2-alpha-20260625140734-1ad8f133387ecf5e348a737d91b1a2e22bcfab4f"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|