aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/graphql-codegen.ts
blob: af62625790f292c41c8fa48fedf9ad37a65d8760 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
	overwrite: true,
	schema: "../common/graphql/schema.graphql",
	documents: ["src/**/*.tsx", "src/**/*.ts", "src/**/*.graphql"],
	generates: {
		"src/graphql/generated/": {
			preset: "client",
			plugins: [],
			config: {
				enumsAsTypes: true,
				skipTypename: true,
				useTypeImports: true,
				scalars: {
					DateTime: "string",
				},
			},
		},
	},
};

export default config;