forked from DogStark/PetChain-MobileApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.ts
More file actions
29 lines (27 loc) · 747 Bytes
/
Copy pathcodegen.ts
File metadata and controls
29 lines (27 loc) · 747 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
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: './backend/src/graphql/schema.graphql',
generates: {
'./backend/src/graphql/generated.ts': {
plugins: ['typescript', 'typescript-resolvers'],
config: {
contextType: './context#GraphQLContext',
useIndexSignature: true,
enumsAsTypes: true,
scalars: {
DateTime: 'string',
},
},
},
'./src/services/graphql/generated.ts': {
documents: ['./src/services/graphql/operations.graphql'],
plugins: ['typescript', 'typescript-operations'],
config: {
scalars: {
DateTime: 'string',
},
},
},
},
};
export default config;