-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodegen.ts
34 lines (32 loc) · 1011 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
34
import { CodegenConfig } from "@graphql-codegen/cli";
const config: CodegenConfig = {
schema: "./schema.graphql",
// schema: "http://localhost:8080/graphql",
documents: ["src/**/*.tsx", "src/**/*.ts", "src/**/*.js"],
generates: {
"./src/__generated__/": {
preset: "client",
presetConfig: {
fragmentMasking: false,
gqlTagName: "gql",
},
plugins: [],
config: {
scalars: {
Date: "string",
DateTime: "string",
Long: "number",
NonNegativeFloat: "number",
NonNegativeInt: "number",
PositiveInt: "number",
Upload: "File",
},
avoidOptionals: true,
dedupeFragments: true,
immutableTypes: true,
},
},
},
ignoreNoDocuments: true,
};
export default config;