-
Notifications
You must be signed in to change notification settings - Fork 18
/
codegen.yml
55 lines (53 loc) · 1.73 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
46
47
48
49
50
51
52
53
54
55
generates:
modules/client/graphql/types.gen.tsx:
config:
# Todo: Enable this setting once it doesn't cause type errors.
noGraphqlTag: false
schema:
- "modules/graphql-api/schema.graphql"
- "modules/client/graphql/schema.graphql"
documents:
- "modules/client/graphql/*/*.graphql"
plugins:
- add:
- 'import * as DateIso from "core/date-iso";'
- 'import * as TimeIso from "core/time-iso";'
- "typescript-common":
scalars:
IsoDate: DateIso.Type
IsoTime: TimeIso.Type
- "typescript-client"
- "typescript-server"
- "typescript-react-apollo"
- "./scripts/codegen-type-constants.js"
modules/client/graphql/client-types.gen.ts:
schema:
- "modules/client/graphql/schema.graphql"
plugins:
- add:
- 'import * as DateIso from "core/date-iso";'
- 'import * as TimeIso from "core/time-iso";'
- "typescript-common":
scalars:
IsoDate: DateIso.Type
IsoTime: TimeIso.Type
- "typescript-resolvers":
contextType: client/graphql/client-context#ClientContext
- "typescript-server"
modules/graphql-api/server-types.gen.ts:
schema:
- "modules/graphql-api/schema.graphql"
plugins:
- add:
- 'import * as DateIso from "core/date-iso";'
- 'import * as TimeIso from "core/time-iso";'
- "typescript-common":
scalars:
IsoDate: DateIso.Type
IsoTime: TimeIso.Type
- "typescript-resolvers":
contextType: graphql-api/context#ApiContext
defaultMapper: any
mappers:
User: "./resolvers/user#MinimalUser"
- "typescript-server"