forked from MrGVSV/obsidian-github-embeds
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.ts
More file actions
32 lines (30 loc) · 789 Bytes
/
codegen.ts
File metadata and controls
32 lines (30 loc) · 789 Bytes
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
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
overwrite: true,
schema: './schema.graphql',
documents: 'src/**/*.graphql',
config: {
skipTypename: false,
},
generates: {
'src/generated/graphql.schema.ts': {
plugins: ['typescript'],
},
'src/': {
preset: 'near-operation-file',
presetConfig: { extension: '.graphql.ts', baseTypesPath: 'generated/graphql.schema.ts' },
plugins: ['typescript-operations', 'typed-document-node'],
config: {
nonOptionalTypename: true,
skipTypename: false,
immutableTypes: true,
useTypeImports: true,
},
},
'src/generated/graphql.schema.json': {
plugins: ['introspection'],
},
},
hooks: { afterAllFileWrite: ['prettier --write'] },
};
export default config;