-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodegen.yml
51 lines (51 loc) · 1.31 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
generates:
src/generated/schema.graphql:
schema:
- 'src/graphql/typeDefs/**/*.graphql'
plugins:
- schema-ast
src/generated/schema.ts:
schema:
- 'src/graphql/typeDefs/**/*.graphql'
plugins:
- add:
content:
- "import { gql } from 'apollo-server-micro';"
- 'export const schema = gql`'
- schema-ast
- add:
placement: 'append'
content:
- '`;'
src/generated/resolver-types.ts:
schema:
- 'src/graphql/typeDefs/**/*.graphql'
plugins:
- typescript
- typescript-resolvers
config:
contextType: '../graphql/context#Context'
mapperTypeSuffix: Model
mappes:
User: '@prisma/client#User'
Belonging: '@prisma/client#Belonging'
Event: '@prisma/client#Event'
Program: '@prisma/client#Program'
Link: '@prisma/client#Link'
scalars:
Datetime: string
src/generated/request.ts:
schema:
- 'src/graphql/typeDefs/**/*.graphql'
documents:
- 'src/graphql/typeDefs/**/*.graphql'
plugins:
- typescript
- typescript-operations
- typescript-react-query
config:
fetcher:
func: '../graphql/customFetcher#useFetchData'
isReactHook: true
scalars:
DateTime: string