-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.ts
More file actions
38 lines (36 loc) · 886 Bytes
/
codegen.ts
File metadata and controls
38 lines (36 loc) · 886 Bytes
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
import { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
overwrite: true,
schema: 'https://7tv.io/v4/gql',
documents: ['src/graphql/**/*.gql'],
generates: {
'./src/graphql/generated/gql.tsx': {
plugins: [
{
add: {
content: '/* eslint-disable */\n// @ts-nocheck',
},
},
'typescript',
'typescript-operations',
'typescript-react-apollo',
],
config: {
withHooks: false,
documentMode: 'documentNode',
scalars: {
Id: 'string',
CustomerId: 'string',
DateTime: 'string',
InvoiceId: 'string',
JSONObject: 'Record<string, unknown>',
StripeProductId: 'string',
},
},
},
},
hooks: {
afterAllFileWrite: ['prettier --write'],
},
};
export default config;