-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathcodegen.ts
More file actions
36 lines (34 loc) · 934 Bytes
/
codegen.ts
File metadata and controls
36 lines (34 loc) · 934 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
// Codegen reads the canonical schema from ../boundless-nestjs/src/schema.gql
// If you need a local copy in this repo, run: `npm run sync-schema`
import type { CodegenConfig } from "@graphql-codegen/cli";
const config: CodegenConfig = {
schema: "./lib/graphql/schema.graphql",
documents: [
"lib/graphql/operations/**/*.graphql",
"lib/graphql/operations/**/*.ts",
"lib/graphql/operations/**/*.tsx",
],
ignoreNoDocuments: true,
generates: {
"./lib/graphql/generated.ts": {
plugins: [
"typescript",
"typescript-operations",
"typescript-react-query",
],
config: {
fetcher: {
func: "./client#fetcher",
isReactHook: false,
},
exposeQueryKeys: true,
reactQueryVersion: 5,
scalars: {
DateTime: "string",
JSON: "Record<string, any>",
},
},
},
},
};
export default config;