-
Notifications
You must be signed in to change notification settings - Fork 0
/
codegen.yml
34 lines (33 loc) · 923 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
34
overwrite: true
schema: "packages/server/schema.graphql"
documents: "packages/client/src/**/*.graphql"
generates:
# Client Code
packages/client/src/generated/graphql.tsx:
plugins:
- "typescript"
- "typescript-operations"
- "typescript-react-apollo"
- "fragment-matcher"
config:
scalars:
DateTime: string
packages/client/src/generated/graphql.schema.json:
plugins:
- "introspection"
# GraphQL Server Code
packages/server/src/graphql/generated/graphql.ts:
plugins:
- "typescript"
- "typescript-resolvers"
- add:
content: "import { GqlMapper } from '../../utils';"
config:
contextType: ../context#Context
useIndexSignature: true
defaultMapper: GqlMapper<{T}>
scalars:
DateTime: luxon#DateTime
packages/server/src/graphql/generated/graphql.schema.json:
plugins:
- "introspection"