-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcodegen.ts
More file actions
29 lines (27 loc) · 787 Bytes
/
codegen.ts
File metadata and controls
29 lines (27 loc) · 787 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
import type { CodegenConfig } from "@graphql-codegen/cli";
import { HASURA_ENDPOINT } from "./src/lib/constants";
const config: CodegenConfig = {
schema: HASURA_ENDPOINT,
documents: ["./graphql/**/*.gql"],
overwrite: true,
generates: {
"./graphql/index.ts": {
plugins: [
"typescript",
"typescript-operations",
"typescript-graphql-request",
],
config: {
skipTypename: false,
useTypeImports: true,
withHooks: false,
withHOC: false,
withComponent: false,
},
},
"./graphql.schema.json": {
plugins: ["introspection"],
},
},
};
export default config;