-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.ts
More file actions
35 lines (33 loc) · 1.02 KB
/
codegen.ts
File metadata and controls
35 lines (33 loc) · 1.02 KB
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
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",
},
namingConvention: {
enumValues: "keep",
},
avoidOptionals: true,
dedupeFragments: true,
immutableTypes: true,
},
},
},
};
export default config;