-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
60 lines (55 loc) · 1.37 KB
/
types.ts
File metadata and controls
60 lines (55 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
export const enum ACTION_TYPE {
mutations = 'mutations',
queries = 'queries',
}
export type TArgV = {
config?: string
}
export type TActionType = ACTION_TYPE
export type TFragmentOverride = Record<string, TCustomField>
export type TCustomField = {
extends?: string[]
fields?: string[]
ignoreFields?: string[]
override?: TFragmentOverride
}
export type TCustomFragment = {
base: string
} & TCustomField
export type TCustomFragments = Record<string, TCustomFragment>
export type TActionInfo = {
resName: string
isList: boolean
}
export type TActionOverride = {
name: string
type: string
}
export type TCustomAction = {
name: string
resName: string
baseAction: string
errorMessage: string
}
export type TAliases = Record<string, string[]>
export type TConfig = {
[ACTION_TYPE.mutations]: Record<string, string | null>
[ACTION_TYPE.queries]: Record<string, string | null>
usedFragments: string[]
fragments: TFragmentOverride
customFragments: TCustomFragments
customQueries: TCustomAction[]
customMutations: TCustomAction[]
}
export type TGlobalVars = {
MODULE_PATH: string
CONFIG_PATH: string
GENERATED_FOLDER_PATH: string
GQL_TYPES_FOLDER_NAME: string
GQL_TYPES_FOLDER_PATH: string
GQL_CONFIGS_FOLDER_NAME: string
GQL_CONFIGS_FOLDER_PATH: string
DEFAULTS_FILE_PATH: string
DEFAULTS_OUT_FILE_PATH: string
CUSTOM_TYPES_FILE_PATH: string
}