@graphql-codegen/visitor-plugin-common
Advanced tools
Comparing version 5.6.1 to 5.7.0-rc-20250219102003-0cfdb198f6db97ac8540d9a444235fd6705a0691
@@ -25,2 +25,3 @@ "use strict"; | ||
printFieldsOnNewLines: rawConfig.printFieldsOnNewLines ?? false, | ||
includeExternalFragments: rawConfig.includeExternalFragments ?? false, | ||
...(additionalConfig || {}), | ||
@@ -27,0 +28,0 @@ }; |
@@ -264,3 +264,3 @@ "use strict"; | ||
const localFragments = orderedDeps | ||
.filter(name => !graph.getNodeData(name).isExternal) | ||
.filter(name => !graph.getNodeData(name).isExternal || this.config.includeExternalFragments) | ||
.map(name => this._generateFragment(graph.getNodeData(name).node)); | ||
@@ -267,0 +267,0 @@ return localFragments.join('\n'); |
@@ -21,2 +21,3 @@ import autoBind from 'auto-bind'; | ||
printFieldsOnNewLines: rawConfig.printFieldsOnNewLines ?? false, | ||
includeExternalFragments: rawConfig.includeExternalFragments ?? false, | ||
...(additionalConfig || {}), | ||
@@ -23,0 +24,0 @@ }; |
@@ -260,3 +260,3 @@ import { basename, extname } from 'path'; | ||
const localFragments = orderedDeps | ||
.filter(name => !graph.getNodeData(name).isExternal) | ||
.filter(name => !graph.getNodeData(name).isExternal || this.config.includeExternalFragments) | ||
.map(name => this._generateFragment(graph.getNodeData(name).node)); | ||
@@ -263,0 +263,0 @@ return localFragments.join('\n'); |
{ | ||
"name": "@graphql-codegen/visitor-plugin-common", | ||
"version": "5.6.1", | ||
"version": "5.7.0-rc-20250219102003-0cfdb198f6db97ac8540d9a444235fd6705a0691", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "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" |
@@ -27,2 +27,3 @@ import { ASTNode, FragmentDefinitionNode, OperationDefinitionNode } from 'graphql'; | ||
printFieldsOnNewLines: boolean; | ||
includeExternalFragments: boolean; | ||
} | ||
@@ -376,2 +377,8 @@ export interface RawConfig { | ||
printFieldsOnNewLines?: boolean; | ||
/** | ||
* @default false | ||
* @description Whether to include external fragments in the generated code. External fragments are not defined | ||
* in the same location as the operation definition. | ||
*/ | ||
includeExternalFragments?: boolean; | ||
} | ||
@@ -378,0 +385,0 @@ export declare class BaseVisitor<TRawConfig extends RawConfig = RawConfig, TPluginConfig extends ParsedConfig = ParsedConfig> { |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
581988
10720
2