/
codegen.yml
48 lines (45 loc) · 1.36 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
overwrite: true
documents: null
generates:
#server types + resolver types from server schema
./server/src/graphql/generated/resolvers.d.ts:
schema: ./server/src/graphql/schema.graphql
config:
contextType: ../requestContext#RequestContext
useIndexSignature: true
plugins:
- typescript
- typescript-resolvers
#client types from web schema and server schema
./web/src/graphql/generated/types.d.ts:
schema:
- ./server/src/graphql/schema.graphql
# - ./web/src/graphql/schema.graphql
documents: ./web/src/graphql/documents/*.graphql
config:
plugins:
- typescript
- typescript-operations
#client types + resolver types from web schema
# ./web/src/graphql/generated/resolvers.d.ts:
# schema: ./web/src/graphql/schema.graphql
# config:
# contextType: ../requestContext#RequestContext
# useIndexSignature: true
# plugins:
# - typescript
# - typescript-resolvers
#client hooks from web schema and server schema
./web/src/graphql/generated/hooks.tsx:
schema:
- ./server/src/graphql/schema.graphql
#- ./web/src/graphql/schema.graphql
documents: ./web/src/graphql/documents/*.graphql
config:
withHOC: false
withComponent: false
withHooks: true
plugins:
- typescript
- typescript-operations
- typescript-react-apollo