-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodegen.ts
46 lines (43 loc) · 903 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
35
36
37
38
39
40
41
42
43
44
45
46
import { CodegenConfig } from "@graphql-codegen/cli";
const scalars = {
date: "string",
money: "number",
float8: "number",
bigint: "number",
uuid: "string",
smallint: "number",
json: "string",
timestamptz: "string",
vector: "string",
};
const config: CodegenConfig = {
schema: [
{
"https://local.graphql.nhost.run/v1": {
headers: {
"x-hasura-admin-secret": "nhost-admin-secret",
},
},
},
],
ignoreNoDocuments: true,
generates: {
"./shared/gql/": {
documents: [
"./src/**/*.(ts|tsx)",
"./functions/{*.ts,!(node_modules)/**/*.ts}",
"./shared/{*.ts,!(gql)/**/*.ts}",
],
preset: "client",
presetConfig: {
fragmentMasking: false,
},
plugins: [],
config: {
scalars,
nonOptionalTypename: true,
},
},
},
};
export default config;