-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.ts
More file actions
37 lines (34 loc) · 992 Bytes
/
codegen.ts
File metadata and controls
37 lines (34 loc) · 992 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
33
34
35
36
37
import { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: process.env.APP_GRAPHQL_CODEGEN_ENDPOINT,
documents: [
'app/**/*.tsx',
'app/**/*.ts'
],
ignoreNoDocuments: true, // for better experience with the watcher
generates: {
'./generated/types/graphql.ts': {
plugins: [
'typescript',
'typescript-operations',
'typescript-urql',
],
config: {
withComponent: false,
withHooks: true,
purgeMagicComment: true,
gqlImport: 'urql#gql',
dedupeFragments: true,
skipTypename: true,
// FIXME: Enable this later
// enumsAsTypes: true,
},
},
'./generated/schema.json': {
plugins: [
'introspection'
],
}
}
}
export default config;