-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcodegen.ts
More file actions
37 lines (35 loc) · 738 Bytes
/
codegen.ts
File metadata and controls
37 lines (35 loc) · 738 Bytes
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
import type { CodegenConfig } from "@graphql-codegen/cli";
const config: CodegenConfig = {
schema: "./src/graphql/schema.graphql",
documents: ["src/**/**.ts"],
config: {
scalars: {
bytea: "bytea",
bigint: "string",
timestamp: "number",
// eslint-disable-next-line quotes
enum_nonfungible_token_capability: '"none" | "mutable" | "minting"',
},
},
generates: {
"./src/graphql/": {
preset: "client",
plugins: [
{
add: {
// eslint-disable-next-line quotes
content: 'import type { bytea } from "~/types/index";',
},
},
],
config: {
useTypeImports: true,
},
presetConfig: {
gqlTagName: "gql",
},
},
},
ignoreNoDocuments: true,
};
export default config;