1 | import { Types } from '@graphql-codegen/plugin-helpers';
|
2 | import { FragmentImport, LoadedFragment, ParsedConfig, ImportDeclaration } from '@graphql-codegen/visitor-plugin-common';
|
3 | import { DocumentNode, FragmentDefinitionNode, GraphQLSchema } from 'graphql';
|
4 | import { DocumentImportResolverOptions } from './resolve-document-imports';
|
5 | export interface NearOperationFileParsedConfig extends ParsedConfig {
|
6 | importTypesNamespace?: string;
|
7 | dedupeOperationSuffix: boolean;
|
8 | omitOperationSuffix: boolean;
|
9 | fragmentVariablePrefix: string;
|
10 | fragmentVariableSuffix: string;
|
11 | }
|
12 | export declare type FragmentRegistry = {
|
13 | [fragmentName: string]: {
|
14 | filePath: string;
|
15 | onType: string;
|
16 | node: FragmentDefinitionNode;
|
17 | imports: Array<FragmentImport>;
|
18 | };
|
19 | };
|
20 |
|
21 |
|
22 |
|
23 | export default function buildFragmentResolver<T>(collectorOptions: DocumentImportResolverOptions, presetOptions: Types.PresetFnArgs<T>, schemaObject: GraphQLSchema): (generatedFilePath: string, documentFileContent: DocumentNode) => {
|
24 | externalFragments: LoadedFragment<{
|
25 | level: number;
|
26 | }>[];
|
27 | fragmentImports: ImportDeclaration<FragmentImport>[];
|
28 | };
|