-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodegen.js
55 lines (53 loc) · 1.39 KB
/
codegen.js
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
52
53
54
55
require('dotenv').config({ path: '.env.local' });
module.exports = {
overwrite: true,
schema: {
[`${process.env.HASURA_URL}/v1/graphql`]: {
headers: {
'x-hasura-admin-secret': process.env.HASURA_ADMIN,
},
},
},
generates: {
'./generated/data-schemas.ts': {
documents: [
'./graphql/**/*.graphql'
],
plugins: [
'typescript',
'typescript-operations',
'typescript-urql'
],
config: {
skipTypename: false,
withHooks: true,
scalars: {
uuid: 'string'
},
}
},
'./generated/config-schemas.ts': {
documents: ['./config/**/*.graphql'],
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request'
],
config: {
skipTypename: false,
withHooks: true,
scalars: {
uuid: 'string'
},
}
},
'./generated/graphql.schema.json': {
plugins: [
'introspection'
]
},
'./graphql.schema.graphql': {
plugins: ['schema-ast'],
},
}
}