forked from Weaverse/pilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.ts
More file actions
29 lines (28 loc) · 850 Bytes
/
codegen.ts
File metadata and controls
29 lines (28 loc) · 850 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 { getSchema, pluckConfig, preset } from "@shopify/hydrogen-codegen";
export default {
overwrite: true,
pluckConfig,
generates: {
"storefront-api.generated.d.ts": {
preset,
schema: getSchema("storefront"),
documents: [
"./*.{ts,tsx,js,jsx}",
"./app/**/*.{ts,tsx,js,jsx}",
"!./app/routes/*.account*.{ts,tsx,js,jsx}",
"!./app/**/*.account.{ts,tsx,js,jsx}",
"!./app/**/*.admin.{ts,tsx,js,jsx}",
],
},
"customer-account-api.generated.d.ts": {
preset,
schema: [getSchema("customer-account")],
documents: [
"./app/routes/*.account*.{ts,tsx,js,jsx}",
"./app/**/*.account.{ts,tsx,js,jsx}",
"!./app/**/*.admin.{ts,tsx,js,jsx}",
],
},
},
} as CodegenConfig;