-
Notifications
You must be signed in to change notification settings - Fork 3
/
codegen.yml
45 lines (45 loc) · 1.28 KB
/
codegen.yml
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
overwrite: true
schema: "../my-music-api/src/schema.graphql"
documents: "src/{queries,mutations}/**/*.{ts,gql}"
hooks:
afterOneFileWrite:
- prettier --write
generates:
src/generated/graphql.ts:
config:
avoidOptionals:
field: true
inputMaybeValue: T | null | undefined
enumsAsConst: true
scalars:
UUID: string
namingConvention:
enumValues: change-case-all#upperCase
immutableTypes: true
nonOptionalTypename: true
plugins:
- "typescript"
- "typescript-operations":
arrayInputCoercion: false
- "typescript-react-apollo":
documentMode: documentNode
- add:
content:
- "/* eslint-disable */"
- "//"
- "// NOTE:"
- "// This file is generated, do not change this manually."
- "// To regenerate it, run `pnpm types:generate:graphql`"
- "// "
src/possibleTypes.ts:
plugins:
- fragment-matcher:
useExplicitTyping: true
- add:
content:
- "/* eslint-disable */"
- "//"
- "// NOTE:"
- "// This file is generated, do not change this manually."
- "// To regenerate it, run `pnpm types:generate:graphql`"
- "// "