-
Notifications
You must be signed in to change notification settings - Fork 2
/
codegen.ctp.yml
39 lines (39 loc) · 1.06 KB
/
codegen.ctp.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
schema:
- '${MC_API_URL}/graphql':
headers:
Cookie: mcAccessToken=${MC_ACCESS_TOKEN}
X-Graphql-Target: ctp
X-Project-Key: ${CTP_PROJECT_KEY}
extensions:
codegen:
generates:
schemas/ctp.json:
plugins:
- introspection
graphql-types/src/generated/ctp.ts:
plugins:
- typescript
- typescript-operations
config:
typesPrefix: TCtp
addUnderscoreToArgsType: true
useImplementingTypes: true
scalars:
Long: number
DateTime: string
Country: string
Locale: string
Date: string
Json: '{ [key: string]: unknown }'
Currency: string
KeyReferenceInput: string
SearchFilter: string
SearchSort: string
YearMonth: string
BigDecimal: string
Time: string
Set: 'unknown[]'
hooks:
afterAllFileWrite:
- prettier --write
- node ./graphql-types/src/types-post-processor.mjs