-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcodegen-inbox.ts
More file actions
44 lines (42 loc) · 1.09 KB
/
codegen-inbox.ts
File metadata and controls
44 lines (42 loc) · 1.09 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
import type { CodegenConfig } from '@graphql-codegen/cli'
const config: CodegenConfig = {
overwrite: true,
// Используем только inbox схему
schema: 'https://inbox.dscrs.site',
documents: ['src/graphql/mutation/chat/**/*.ts', 'src/graphql/query/chat/**/*.ts'],
generates: {
'./src/graphql/generated/inbox-introspection.json': {
plugins: ['introspection'],
config: {
minify: true
}
},
'./src/graphql/generated/inbox-schema.graphql': {
plugins: ['schema-ast'],
config: {
includeDirectives: false
}
},
'./src/graphql/generated/inbox/': {
preset: 'client',
plugins: [],
presetConfig: {
gqlTagName: 'gql',
fragmentMasking: false
},
config: {
scalars: {
DateTime: 'string',
JSON: 'Record<string, any>'
},
skipTypename: false,
useTypeImports: true,
dedupeOperationSuffix: true,
dedupeFragments: true,
avoidOptionals: false,
enumsAsTypes: false
}
}
}
}
export default config