@@ -38,6 +38,7 @@ export interface ParsedConfig {
3838 inlineFragmentTypes : InlineFragmentTypeOptions ;
3939 emitLegacyCommonJSImports : boolean ;
4040 printFieldsOnNewLines : boolean ;
41+ includeExternalFragments : boolean ;
4142}
4243
4344export interface RawConfig {
@@ -391,6 +392,13 @@ export interface RawConfig {
391392 * without resorting to running tools like Prettier on the output.
392393 */
393394 printFieldsOnNewLines ?: boolean ;
395+
396+ /**
397+ * @default false
398+ * @description Whether to include external fragments in the generated code. External fragments are not defined
399+ * in the same location as the operation definition.
400+ */
401+ includeExternalFragments ?: boolean ;
394402}
395403
396404export class BaseVisitor < TRawConfig extends RawConfig = RawConfig , TPluginConfig extends ParsedConfig = ParsedConfig > {
@@ -415,6 +423,7 @@ export class BaseVisitor<TRawConfig extends RawConfig = RawConfig, TPluginConfig
415423 rawConfig . emitLegacyCommonJSImports === undefined ? true : ! ! rawConfig . emitLegacyCommonJSImports ,
416424 extractAllFieldsToTypes : rawConfig . extractAllFieldsToTypes ?? false ,
417425 printFieldsOnNewLines : rawConfig . printFieldsOnNewLines ?? false ,
426+ includeExternalFragments : rawConfig . includeExternalFragments ?? false ,
418427 ...( ( additionalConfig || { } ) as any ) ,
419428 } ;
420429
0 commit comments