-
Notifications
You must be signed in to change notification settings - Fork 0
/
codegen.yml
34 lines (33 loc) · 1018 Bytes
/
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
# This configuration file tells GraphQL Code Generator how
# to generate types based on our schema.
schema: "./src/graphql/**/*.graphql"
overwrite: true
emitLegacyCommonJSImports: False
generates:
# Specify where our generated types should live.
./src/app/entities/api.ts:
plugins:
- "typescript"
- "typescript-resolvers"
- "typescript-operations"
config:
useIndexSignature: true
# More on this below!
contextType: "../../index.js#MyContext"
resolverTypeWrapperSignature: "T | Promise<T> | Partial<T> | Promise<Partial<T>>"
scalars:
Date: Date
DateFuture: Date
DatePast: Date
IntPositive: number
IntNonNegative: number
IntNegative: number
IntNonPositive: number
IntNonZero: number
FloatPositive: number
FloatNonNegative: number
FloatNegative: number
FloatNonPositive: number
FloatNonZero: number
Float0To1: number
StringNonEmpty: string