1 | import { Types } from '@graphql-codegen/plugin-helpers';
|
2 | import { ImportSource, FragmentImport, ImportDeclaration, LoadedFragment } from '@graphql-codegen/visitor-plugin-common';
|
3 | import { FragmentDefinitionNode, GraphQLSchema } from 'graphql';
|
4 | import { Source } from '@graphql-tools/utils';
|
5 | export declare type FragmentRegistry = {
|
6 | [fragmentName: string]: {
|
7 | location: string;
|
8 | importNames: string[];
|
9 | onType: string;
|
10 | node: FragmentDefinitionNode;
|
11 | };
|
12 | };
|
13 | export declare type DocumentImportResolverOptions = {
|
14 | baseDir: string;
|
15 | |
16 |
|
17 |
|
18 | generateFilePath: (location: string) => string;
|
19 | |
20 |
|
21 |
|
22 | schemaTypesSource: string | ImportSource;
|
23 | |
24 |
|
25 |
|
26 | typesImport: boolean;
|
27 | };
|
28 | interface ResolveDocumentImportResult {
|
29 | filename: string;
|
30 | documents: [Source];
|
31 | importStatements: string[];
|
32 | fragmentImports: ImportDeclaration<FragmentImport>[];
|
33 | externalFragments: LoadedFragment<{
|
34 | level: number;
|
35 | }>[];
|
36 | }
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | export declare function resolveDocumentImports<T>(presetOptions: Types.PresetFnArgs<T>, schemaObject: GraphQLSchema, importResolverOptions: DocumentImportResolverOptions): Array<ResolveDocumentImportResult>;
|
44 | export {};
|