-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodegen.ts
29 lines (27 loc) · 807 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
import type { CodegenConfig } from "@graphql-codegen/cli";
const config: CodegenConfig = {
schema: [
{
"https://app.opslevel.com/graphql": {
method: "POST",
headers: {
"GraphQL-Visibility": "internal",
Authorization: `Bearer ${process.env.OPSLEVEL_TOKEN}`,
},
},
},
],
documents: ["src/**/*.ts", "src/**/*.graphql"],
ignoreNoDocuments: true,
generates: {
"./src/client/gql-types.d.ts": {
plugins: ["typescript", "typescript-operations"],
config: {
onlyOperationTypes: true,
avoidOptionals: true,
immutableTypes: true,
},
},
},
};
export default config;