@graphql-codegen/visitor-plugin-common 7.0.1 → 7.0.2
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.
|
@@ -221,16 +221,18 @@ class SelectionSetToObject {
|
|
|
221
221
|
fieldNodes.push(selection);
|
|
222
222
|
break;
|
|
223
223
|
case graphql_1.Kind.INLINE_FRAGMENT:
|
|
224
|
-
if (
|
|
225
|
-
(0, utils_js_1.
|
|
224
|
+
if (!this._config.extractAllFieldsToTypesCompact &&
|
|
225
|
+
((0, utils_js_1.hasConditionalDirectives)(selection.directives) ||
|
|
226
|
+
(0, utils_js_1.hasIncrementalDeliveryDirectives)(selection.directives))) {
|
|
226
227
|
inlineFragmentConditionalSelections.push(selection);
|
|
227
228
|
break;
|
|
228
229
|
}
|
|
229
230
|
inlineFragmentSelections.push(selection);
|
|
230
231
|
break;
|
|
231
232
|
case graphql_1.Kind.FRAGMENT_SPREAD:
|
|
232
|
-
if (
|
|
233
|
-
(0, utils_js_1.
|
|
233
|
+
if (!this._config.extractAllFieldsToTypesCompact &&
|
|
234
|
+
((0, utils_js_1.hasConditionalDirectives)(selection.directives) ||
|
|
235
|
+
(0, utils_js_1.hasIncrementalDeliveryDirectives)(selection.directives))) {
|
|
234
236
|
fragmentSpreadsConditionalSelections.push(selection);
|
|
235
237
|
break;
|
|
236
238
|
}
|
|
@@ -217,16 +217,18 @@ export class SelectionSetToObject {
|
|
|
217
217
|
fieldNodes.push(selection);
|
|
218
218
|
break;
|
|
219
219
|
case Kind.INLINE_FRAGMENT:
|
|
220
|
-
if (
|
|
221
|
-
|
|
220
|
+
if (!this._config.extractAllFieldsToTypesCompact &&
|
|
221
|
+
(hasConditionalDirectives(selection.directives) ||
|
|
222
|
+
hasIncrementalDeliveryDirectives(selection.directives))) {
|
|
222
223
|
inlineFragmentConditionalSelections.push(selection);
|
|
223
224
|
break;
|
|
224
225
|
}
|
|
225
226
|
inlineFragmentSelections.push(selection);
|
|
226
227
|
break;
|
|
227
228
|
case Kind.FRAGMENT_SPREAD:
|
|
228
|
-
if (
|
|
229
|
-
|
|
229
|
+
if (!this._config.extractAllFieldsToTypesCompact &&
|
|
230
|
+
(hasConditionalDirectives(selection.directives) ||
|
|
231
|
+
hasIncrementalDeliveryDirectives(selection.directives))) {
|
|
230
232
|
fragmentSpreadsConditionalSelections.push(selection);
|
|
231
233
|
break;
|
|
232
234
|
}
|