forked from pezzolabs/pezzo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.ts
More file actions
26 lines (22 loc) · 658 Bytes
/
Copy pathcodegen.ts
File metadata and controls
26 lines (22 loc) · 658 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
import { CodegenConfig } from "@graphql-codegen/cli";
const OFFLINE =
process.env.OFFLINE === "true" || process.env.GITHUB_ACTIONS === "true";
const schema = OFFLINE
? "./apps/server/schema.graphql"
: "http://localhost:3000/graphql";
const config: CodegenConfig = {
schema,
documents: ["./apps/console/src/graphql/definitions/**/*"],
ignoreNoDocuments: true, // for better experience with the watcher
generates: {
"./apps/server/src/@generated/graphql/": {
preset: "client",
plugins: [],
},
"./apps/console/src/@generated/graphql/": {
preset: "client",
plugins: [],
},
},
};
export default config;