-
Notifications
You must be signed in to change notification settings - Fork 0
/
codegen.ts
45 lines (43 loc) · 1.13 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
import type { CodegenConfig } from '@graphql-codegen/cli'
import { SUBGRAPH_URL } from './src/constants/tokenAddresses'
const config: CodegenConfig = {
ignoreNoDocuments: true,
hooks: { afterAllFileWrite: ['eslint --fix'] },
generates: {
'./src/gql/generated/kassandraApi.ts': {
schema: SUBGRAPH_URL,
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/backendApi.ts': {
schema: 'https://backend.kassandra.finance/',
documents: ['./src/gql/queries/backend/**/*-backend.gql'],
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request'
],
config: {
enumsAsTypes: true,
scalars: {
BigDecimal: 'string',
BigInt: 'string',
Bytes: 'string'
}
}
}
}
}
export default config