UNPKG

1.57 kBTypeScriptView Raw
1export interface Field {
2 name: string;
3 type?: string;
4 schemaFieldName?: string;
5 isAliased?: boolean;
6 isArray?: boolean;
7 isRequired?: boolean;
8 schemaType?: any;
9}
10export interface EnumValue {
11 name: string;
12 description: string;
13}
14export interface InlineFragment {
15 typeName?: string;
16 onModel?: string;
17}
18export interface SpreadFragment {
19 fieldName?: string;
20 typeName?: string;
21}
22export interface Model {
23 name?: string;
24 description?: string;
25 fields?: Field[];
26 isObject?: boolean;
27 isCustomScalar?: boolean;
28 isFragment?: boolean;
29 isInlineFragment?: boolean;
30 isEnum?: boolean;
31 isUnion?: boolean;
32 isArgumentsType?: boolean;
33 usingFragments?: boolean;
34 enumValues?: EnumValue[];
35 fragmentsUsed?: SpreadFragment[];
36 inlineFragments?: InlineFragment[];
37 hasInlineFragments?: boolean;
38 imports?: string[];
39 implementedInterfaces?: string[];
40 hasImplementedInterfaces?: boolean;
41 hasUnionTypes?: boolean;
42 unionTypes?: string[];
43 isRoot?: boolean;
44 innerTypes?: Model[];
45 schemaTypeName?: string;
46 isInput?: boolean;
47}
48export interface CodegenDocument {
49 isQuery: boolean;
50 isMutation: boolean;
51 isSubscription: boolean;
52 isFragment: boolean;
53 name: string;
54 document: string;
55 rawName: string;
56 innerTypes: Model[];
57 rootType: Model[];
58 variables: Field[];
59 hasInnerTypes: boolean;
60 hasVariables: boolean;
61 imports?: string[];
62}
63export interface Codegen {
64 models: Model[];
65 documents: CodegenDocument[];
66}