-
Notifications
You must be signed in to change notification settings - Fork 11
/
codegen.ts
33 lines (31 loc) · 746 Bytes
/
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
import { CodegenConfig } from "@graphql-codegen/cli";
const config: CodegenConfig = {
schema: "../ads-serve/src/graphql/schema.graphql",
documents: ["src/**/*.ts", "src/**/*.tsx", "src/**/*.graphql"],
ignoreNoDocuments: true,
overwrite: true,
generates: {
"./src/graphql-client/": {
preset: "client",
presetConfig: {
fragmentMasking: false,
},
},
"src/graphql/ads-serve.graphql.schema.json": {
plugins: ["introspection"],
},
},
config: {
strictScalars: true,
useTypeImports: true,
scalars: {
DateTime: "string",
Numeric: {
input: "string | number",
output: "string",
},
JSONObject: "object",
},
},
};
export default config;