-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodegen.ts
60 lines (58 loc) · 1.66 KB
/
codegen.ts
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
56
57
58
59
60
import type { CodegenConfig } from '@graphql-codegen/cli'
const config: CodegenConfig = {
ignoreNoDocuments: true,
// hooks: { afterAllFileWrite: ['eslint --fix'] },
generates: {
'./src/gql/generated/kassandraApi.ts': {
schema: 'https://graph.kassandra.finance/subgraphs/name/Kassandra',
documents: ['./src/gql/queries/kassandra/**/*-kassandra.gql'],
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request'
],
config: {
enumsAsTypes: true,
scalars: {
BigDecimal: 'string',
BigInt: 'string',
Bytes: 'string'
}
}
},
// './src/gql/generated/githubApi.ts': {
// // schema: [
// // {
// // 'https://api.github.com/graphql': {
// // headers: {
// // Authorization: `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`,
// // }
// // }
// // }
// // ],
// schema: './schema.docs.graphql',
// documents: ['./src/gql/queries/github/**/*-github.gql'],
// plugins: [
// 'typescript',
// 'typescript-operations',
// 'typescript-graphql-request'
// ],
// config: {
// enumsAsTypes: true
// }
// },
'./src/gql/generated/kassandraBlogApi.ts': {
schema: 'https://strapi-kassandra-production.up.railway.app/graphql',
documents: ['./src/gql/queries/kassandraBlog/**/*-kassandraBlog.gql'],
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request'
],
config: {
enumsAsTypes: true
}
}
}
}
export default config