@graphcommerce/next-config 6.2.0-canary.7 → 6.2.0-canary.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.9
4
+
5
+ ## 6.2.0-canary.8
6
+
3
7
  ## 6.2.0-canary.7
4
8
 
5
9
  ## 6.2.0-canary.6
@@ -28,6 +28,8 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
28
28
  [
29
29
  "GC_CANONICAL_BASE_URL",
30
30
  "GC_CART_DISPLAY_PRICES_INCL_TAX",
31
+ "GC_COMPARE",
32
+ "GC_COMPARE_CHECKBOX",
31
33
  "GC_CUSTOMER_REQUIRE_EMAIL_CONFIRMATION",
32
34
  "GC_DEBUG",
33
35
  "GC_DEBUG_PLUGIN_STATUS",
@@ -38,6 +40,8 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
38
40
  "GC_GOOGLE_RECAPTCHA_KEY",
39
41
  "GC_GOOGLE_TAGMANAGER_ID",
40
42
  "GC_HYGRAPH_ENDPOINT",
43
+ "GC_HYGRAPH_WRITE_ACCESS_ENDPOINT",
44
+ "GC_HYGRAPH_WRITE_ACCESS_TOKEN",
41
45
  "GC_LEGACY_PRODUCT_ROUTE",
42
46
  "GC_LIMIT_SSG",
43
47
  "GC_MAGENTO_ENDPOINT",
@@ -49,6 +53,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
49
53
  "GC_STOREFRONT_0",
50
54
  "GC_STOREFRONT_0_CANONICAL_BASE_URL",
51
55
  "GC_STOREFRONT_0_CART_DISPLAY_PRICES_INCL_TAX",
56
+ "GC_STOREFRONT_0_COMPARE_CHECKBOX",
52
57
  "GC_STOREFRONT_0_DEFAULT_LOCALE",
53
58
  "GC_STOREFRONT_0_DOMAIN",
54
59
  "GC_STOREFRONT_0_GOOGLE_ANALYTICS_ID",
@@ -82,6 +87,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
82
87
  "GC_STOREFRONT_1",
83
88
  "GC_STOREFRONT_1_CANONICAL_BASE_URL",
84
89
  "GC_STOREFRONT_1_CART_DISPLAY_PRICES_INCL_TAX",
90
+ "GC_STOREFRONT_1_COMPARE_CHECKBOX",
85
91
  "GC_STOREFRONT_1_DEFAULT_LOCALE",
86
92
  "GC_STOREFRONT_1_DOMAIN",
87
93
  "GC_STOREFRONT_1_GOOGLE_ANALYTICS_ID",
@@ -115,6 +121,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
115
121
  "GC_STOREFRONT_2",
116
122
  "GC_STOREFRONT_2_CANONICAL_BASE_URL",
117
123
  "GC_STOREFRONT_2_CART_DISPLAY_PRICES_INCL_TAX",
124
+ "GC_STOREFRONT_2_COMPARE_CHECKBOX",
118
125
  "GC_STOREFRONT_2_DEFAULT_LOCALE",
119
126
  "GC_STOREFRONT_2_DOMAIN",
120
127
  "GC_STOREFRONT_2_GOOGLE_ANALYTICS_ID",
@@ -148,6 +155,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
148
155
  "GC_STOREFRONT_3",
149
156
  "GC_STOREFRONT_3_CANONICAL_BASE_URL",
150
157
  "GC_STOREFRONT_3_CART_DISPLAY_PRICES_INCL_TAX",
158
+ "GC_STOREFRONT_3_COMPARE_CHECKBOX",
151
159
  "GC_STOREFRONT_3_DEFAULT_LOCALE",
152
160
  "GC_STOREFRONT_3_DOMAIN",
153
161
  "GC_STOREFRONT_3_GOOGLE_ANALYTICS_ID",
@@ -181,6 +189,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
181
189
  "GC_STOREFRONT_4",
182
190
  "GC_STOREFRONT_4_CANONICAL_BASE_URL",
183
191
  "GC_STOREFRONT_4_CART_DISPLAY_PRICES_INCL_TAX",
192
+ "GC_STOREFRONT_4_COMPARE_CHECKBOX",
184
193
  "GC_STOREFRONT_4_DEFAULT_LOCALE",
185
194
  "GC_STOREFRONT_4_DOMAIN",
186
195
  "GC_STOREFRONT_4_GOOGLE_ANALYTICS_ID",
@@ -214,6 +223,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
214
223
  "GC_STOREFRONT_5",
215
224
  "GC_STOREFRONT_5_CANONICAL_BASE_URL",
216
225
  "GC_STOREFRONT_5_CART_DISPLAY_PRICES_INCL_TAX",
226
+ "GC_STOREFRONT_5_COMPARE_CHECKBOX",
217
227
  "GC_STOREFRONT_5_DEFAULT_LOCALE",
218
228
  "GC_STOREFRONT_5_DOMAIN",
219
229
  "GC_STOREFRONT_5_GOOGLE_ANALYTICS_ID",
@@ -247,6 +257,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
247
257
  "GC_STOREFRONT_6",
248
258
  "GC_STOREFRONT_6_CANONICAL_BASE_URL",
249
259
  "GC_STOREFRONT_6_CART_DISPLAY_PRICES_INCL_TAX",
260
+ "GC_STOREFRONT_6_COMPARE_CHECKBOX",
250
261
  "GC_STOREFRONT_6_DEFAULT_LOCALE",
251
262
  "GC_STOREFRONT_6_DOMAIN",
252
263
  "GC_STOREFRONT_6_GOOGLE_ANALYTICS_ID",
@@ -280,6 +291,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
280
291
  "GC_STOREFRONT_7",
281
292
  "GC_STOREFRONT_7_CANONICAL_BASE_URL",
282
293
  "GC_STOREFRONT_7_CART_DISPLAY_PRICES_INCL_TAX",
294
+ "GC_STOREFRONT_7_COMPARE_CHECKBOX",
283
295
  "GC_STOREFRONT_7_DEFAULT_LOCALE",
284
296
  "GC_STOREFRONT_7_DOMAIN",
285
297
  "GC_STOREFRONT_7_GOOGLE_ANALYTICS_ID",
@@ -313,6 +325,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
313
325
  "GC_STOREFRONT_8",
314
326
  "GC_STOREFRONT_8_CANONICAL_BASE_URL",
315
327
  "GC_STOREFRONT_8_CART_DISPLAY_PRICES_INCL_TAX",
328
+ "GC_STOREFRONT_8_COMPARE_CHECKBOX",
316
329
  "GC_STOREFRONT_8_DEFAULT_LOCALE",
317
330
  "GC_STOREFRONT_8_DOMAIN",
318
331
  "GC_STOREFRONT_8_GOOGLE_ANALYTICS_ID",
@@ -346,6 +359,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
346
359
  "GC_STOREFRONT_9",
347
360
  "GC_STOREFRONT_9_CANONICAL_BASE_URL",
348
361
  "GC_STOREFRONT_9_CART_DISPLAY_PRICES_INCL_TAX",
362
+ "GC_STOREFRONT_9_COMPARE_CHECKBOX",
349
363
  "GC_STOREFRONT_9_DEFAULT_LOCALE",
350
364
  "GC_STOREFRONT_9_DOMAIN",
351
365
  "GC_STOREFRONT_9_GOOGLE_ANALYTICS_ID",
@@ -379,6 +393,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
379
393
  "GC_STOREFRONT_10",
380
394
  "GC_STOREFRONT_10_CANONICAL_BASE_URL",
381
395
  "GC_STOREFRONT_10_CART_DISPLAY_PRICES_INCL_TAX",
396
+ "GC_STOREFRONT_10_COMPARE_CHECKBOX",
382
397
  "GC_STOREFRONT_10_DEFAULT_LOCALE",
383
398
  "GC_STOREFRONT_10_DOMAIN",
384
399
  "GC_STOREFRONT_10_GOOGLE_ANALYTICS_ID",
@@ -412,6 +427,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
412
427
  "GC_STOREFRONT_11",
413
428
  "GC_STOREFRONT_11_CANONICAL_BASE_URL",
414
429
  "GC_STOREFRONT_11_CART_DISPLAY_PRICES_INCL_TAX",
430
+ "GC_STOREFRONT_11_COMPARE_CHECKBOX",
415
431
  "GC_STOREFRONT_11_DEFAULT_LOCALE",
416
432
  "GC_STOREFRONT_11_DOMAIN",
417
433
  "GC_STOREFRONT_11_GOOGLE_ANALYTICS_ID",
@@ -445,6 +461,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
445
461
  "GC_STOREFRONT_12",
446
462
  "GC_STOREFRONT_12_CANONICAL_BASE_URL",
447
463
  "GC_STOREFRONT_12_CART_DISPLAY_PRICES_INCL_TAX",
464
+ "GC_STOREFRONT_12_COMPARE_CHECKBOX",
448
465
  "GC_STOREFRONT_12_DEFAULT_LOCALE",
449
466
  "GC_STOREFRONT_12_DOMAIN",
450
467
  "GC_STOREFRONT_12_GOOGLE_ANALYTICS_ID",
@@ -478,6 +495,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
478
495
  "GC_STOREFRONT_13",
479
496
  "GC_STOREFRONT_13_CANONICAL_BASE_URL",
480
497
  "GC_STOREFRONT_13_CART_DISPLAY_PRICES_INCL_TAX",
498
+ "GC_STOREFRONT_13_COMPARE_CHECKBOX",
481
499
  "GC_STOREFRONT_13_DEFAULT_LOCALE",
482
500
  "GC_STOREFRONT_13_DOMAIN",
483
501
  "GC_STOREFRONT_13_GOOGLE_ANALYTICS_ID",
@@ -511,6 +529,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
511
529
  "GC_STOREFRONT_14",
512
530
  "GC_STOREFRONT_14_CANONICAL_BASE_URL",
513
531
  "GC_STOREFRONT_14_CART_DISPLAY_PRICES_INCL_TAX",
532
+ "GC_STOREFRONT_14_COMPARE_CHECKBOX",
514
533
  "GC_STOREFRONT_14_DEFAULT_LOCALE",
515
534
  "GC_STOREFRONT_14_DOMAIN",
516
535
  "GC_STOREFRONT_14_GOOGLE_ANALYTICS_ID",
@@ -544,6 +563,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
544
563
  "GC_STOREFRONT_15",
545
564
  "GC_STOREFRONT_15_CANONICAL_BASE_URL",
546
565
  "GC_STOREFRONT_15_CART_DISPLAY_PRICES_INCL_TAX",
566
+ "GC_STOREFRONT_15_COMPARE_CHECKBOX",
547
567
  "GC_STOREFRONT_15_DEFAULT_LOCALE",
548
568
  "GC_STOREFRONT_15_DOMAIN",
549
569
  "GC_STOREFRONT_15_GOOGLE_ANALYTICS_ID",
@@ -577,6 +597,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
577
597
  "GC_STOREFRONT_16",
578
598
  "GC_STOREFRONT_16_CANONICAL_BASE_URL",
579
599
  "GC_STOREFRONT_16_CART_DISPLAY_PRICES_INCL_TAX",
600
+ "GC_STOREFRONT_16_COMPARE_CHECKBOX",
580
601
  "GC_STOREFRONT_16_DEFAULT_LOCALE",
581
602
  "GC_STOREFRONT_16_DOMAIN",
582
603
  "GC_STOREFRONT_16_GOOGLE_ANALYTICS_ID",
@@ -610,6 +631,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
610
631
  "GC_STOREFRONT_17",
611
632
  "GC_STOREFRONT_17_CANONICAL_BASE_URL",
612
633
  "GC_STOREFRONT_17_CART_DISPLAY_PRICES_INCL_TAX",
634
+ "GC_STOREFRONT_17_COMPARE_CHECKBOX",
613
635
  "GC_STOREFRONT_17_DEFAULT_LOCALE",
614
636
  "GC_STOREFRONT_17_DOMAIN",
615
637
  "GC_STOREFRONT_17_GOOGLE_ANALYTICS_ID",
@@ -643,6 +665,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
643
665
  "GC_STOREFRONT_18",
644
666
  "GC_STOREFRONT_18_CANONICAL_BASE_URL",
645
667
  "GC_STOREFRONT_18_CART_DISPLAY_PRICES_INCL_TAX",
668
+ "GC_STOREFRONT_18_COMPARE_CHECKBOX",
646
669
  "GC_STOREFRONT_18_DEFAULT_LOCALE",
647
670
  "GC_STOREFRONT_18_DOMAIN",
648
671
  "GC_STOREFRONT_18_GOOGLE_ANALYTICS_ID",
@@ -676,6 +699,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
676
699
  "GC_STOREFRONT_19",
677
700
  "GC_STOREFRONT_19_CANONICAL_BASE_URL",
678
701
  "GC_STOREFRONT_19_CART_DISPLAY_PRICES_INCL_TAX",
702
+ "GC_STOREFRONT_19_COMPARE_CHECKBOX",
679
703
  "GC_STOREFRONT_19_DEFAULT_LOCALE",
680
704
  "GC_STOREFRONT_19_DOMAIN",
681
705
  "GC_STOREFRONT_19_GOOGLE_ANALYTICS_ID",
@@ -709,6 +733,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
709
733
  "GC_STOREFRONT_20",
710
734
  "GC_STOREFRONT_20_CANONICAL_BASE_URL",
711
735
  "GC_STOREFRONT_20_CART_DISPLAY_PRICES_INCL_TAX",
736
+ "GC_STOREFRONT_20_COMPARE_CHECKBOX",
712
737
  "GC_STOREFRONT_20_DEFAULT_LOCALE",
713
738
  "GC_STOREFRONT_20_DOMAIN",
714
739
  "GC_STOREFRONT_20_GOOGLE_ANALYTICS_ID",
@@ -165,6 +165,12 @@ it('finds plugins', () => {
165
165
  "func": "graphqlConfig",
166
166
  "plugin": "@graphcommerce/magento-store/plugins/magentoStoreGraphqlConfig",
167
167
  },
168
+ {
169
+ "enabled": true,
170
+ "exported": "@graphcommerce/graphql/config",
171
+ "func": "graphqlConfig",
172
+ "plugin": "@graphcommerce/magento-graphql/plugins/magentoGraphqlConfig",
173
+ },
168
174
  ]
169
175
  `)
170
176
  expect(disabled).toMatchInlineSnapshot(`
@@ -211,6 +217,34 @@ it('finds plugins', () => {
211
217
  "ifConfig": "googleTagmanagerId",
212
218
  "plugin": "@graphcommerce/googletagmanager/plugins/GtagFramerNextPages",
213
219
  },
220
+ {
221
+ "component": "CartFab",
222
+ "enabled": false,
223
+ "exported": "@graphcommerce/magento-cart",
224
+ "ifConfig": "compare",
225
+ "plugin": "@graphcommerce/magento-compare/plugins/AddCompareFabNextToCart",
226
+ },
227
+ {
228
+ "component": "ProductPageAddToCartActionsRow",
229
+ "enabled": false,
230
+ "exported": "@graphcommerce/magento-product",
231
+ "ifConfig": "compare",
232
+ "plugin": "@graphcommerce/magento-compare/plugins/AddCompareToProductPage",
233
+ },
234
+ {
235
+ "component": "GraphQLProvider",
236
+ "enabled": false,
237
+ "exported": "@graphcommerce/graphql",
238
+ "ifConfig": "compare",
239
+ "plugin": "@graphcommerce/magento-compare/plugins/AddCompareTypePolicies",
240
+ },
241
+ {
242
+ "component": "ProductListItem",
243
+ "enabled": false,
244
+ "exported": "@graphcommerce/magento-product",
245
+ "ifConfig": "compare",
246
+ "plugin": "@graphcommerce/magento-compare/plugins/CompareAbleProductListItem",
247
+ },
214
248
  ]
215
249
  `)
216
250
  })
@@ -9,12 +9,13 @@ it('resolves dependences', () => {
9
9
  Map {
10
10
  "." => "examples/magento-graphcms",
11
11
  "@graphcommerce/cli" => "packages/cli",
12
+ "@graphcommerce/hygraph-cli" => "packages/hygraph-cli",
12
13
  "@graphcommerce/demo-magento-graphcommerce" => "packages/demo-magento-graphcommerce",
13
14
  "@graphcommerce/googleanalytics" => "packages/googleanalytics",
14
15
  "@graphcommerce/magento-cart-shipping-method" => "packages/magento-cart-shipping-method",
15
16
  "@graphcommerce/googlerecaptcha" => "packages/googlerecaptcha",
16
17
  "@graphcommerce/googletagmanager" => "packages/googletagmanager",
17
- "@graphcommerce/graphcms-ui" => "packages/graphcms-ui",
18
+ "@graphcommerce/graphcms-ui" => "packages/hygraph-ui",
18
19
  "@graphcommerce/lingui-next" => "packages/lingui-next",
19
20
  "@graphcommerce/next-config" => "packagesDev/next-config",
20
21
  "@graphcommerce/magento-cart-billing-address" => "packages/magento-cart-billing-address",
@@ -22,6 +23,7 @@ it('resolves dependences', () => {
22
23
  "@graphcommerce/magento-cart-coupon" => "packages/magento-cart-coupon",
23
24
  "@graphcommerce/magento-cart-email" => "packages/magento-cart-email",
24
25
  "@graphcommerce/magento-cms" => "packages/magento-cms",
26
+ "@graphcommerce/magento-compare" => "packages/magento-compare",
25
27
  "@graphcommerce/magento-newsletter" => "packages/magento-newsletter",
26
28
  "@graphcommerce/magento-payment-included" => "packages/magento-payment-included",
27
29
  "@graphcommerce/magento-cart-payment-method" => "packages/magento-cart-payment-method",
@@ -22,4 +22,5 @@ exports.demoConfig = {
22
22
  robotsAllow: false,
23
23
  demoMode: true,
24
24
  limitSsg: true,
25
+ compare: true,
25
26
  };
@@ -1,15 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
3
+ exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.CompareVariantSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
4
4
  /* eslint-disable */
5
5
  const zod_1 = require("zod");
6
6
  const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
7
7
  exports.isDefinedNonNullAny = isDefinedNonNullAny;
8
8
  exports.definedNonNullAnySchema = zod_1.z.any().refine((v) => (0, exports.isDefinedNonNullAny)(v));
9
+ exports.CompareVariantSchema = zod_1.z.enum(['CHECKBOX', 'ICON']);
9
10
  function GraphCommerceConfigSchema() {
10
11
  return zod_1.z.object({
11
12
  canonicalBaseUrl: zod_1.z.string().min(1),
12
13
  cartDisplayPricesInclTax: zod_1.z.boolean().nullish(),
14
+ compare: zod_1.z.boolean().nullish(),
15
+ compareVariant: exports.CompareVariantSchema.nullish(),
13
16
  customerRequireEmailConfirmation: zod_1.z.boolean().nullish(),
14
17
  debug: GraphCommerceDebugConfigSchema().nullish(),
15
18
  demoMode: zod_1.z.boolean().nullish(),
@@ -17,6 +20,8 @@ function GraphCommerceConfigSchema() {
17
20
  googleRecaptchaKey: zod_1.z.string().nullish(),
18
21
  googleTagmanagerId: zod_1.z.string().nullish(),
19
22
  hygraphEndpoint: zod_1.z.string().min(1),
23
+ hygraphWriteAccessEndpoint: zod_1.z.string().nullish(),
24
+ hygraphWriteAccessToken: zod_1.z.string().nullish(),
20
25
  legacyProductRoute: zod_1.z.boolean().nullish(),
21
26
  limitSsg: zod_1.z.boolean().nullish(),
22
27
  magentoEndpoint: zod_1.z.string().min(1),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-config",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "6.2.0-canary.7",
5
+ "version": "6.2.0-canary.9",
6
6
  "type": "commonjs",
7
7
  "main": "dist/index.js",
8
8
  "types": "src/index.ts",
@@ -21,4 +21,5 @@ export const demoConfig: Partial<GraphCommerceConfig> & Record<string, unknown>
21
21
  robotsAllow: false,
22
22
  demoMode: true,
23
23
  limitSsg: true,
24
+ compare: true,
24
25
  }
@@ -14,6 +14,10 @@ export type Scalars = {
14
14
  Float: number;
15
15
  };
16
16
 
17
+ export type CompareVariant =
18
+ | 'CHECKBOX'
19
+ | 'ICON';
20
+
17
21
  /**
18
22
  * # GraphCommerce configuration system
19
23
  *
@@ -107,6 +111,13 @@ export type GraphCommerceConfig = {
107
111
  * When Magento's StoreConfig adds this value, this can be replaced.
108
112
  */
109
113
  cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']>;
114
+ /** Use compare functionality */
115
+ compare?: InputMaybe<Scalars['Boolean']>;
116
+ /**
117
+ * By default the compare feature is denoted with a 'compare icon' (2 arrows facing one another).
118
+ * This may be fine for experienced users, but for more clarity it's also possible to present the compare feature as a checkbox accompanied by the 'Compare' label
119
+ */
120
+ compareVariant?: InputMaybe<CompareVariant>;
110
121
  /**
111
122
  * Due to a limitation in the GraphQL API of Magento 2, we need to know if the
112
123
  * customer requires email confirmation.
@@ -148,9 +159,45 @@ export type GraphCommerceConfig = {
148
159
  /**
149
160
  * The HyGraph endpoint.
150
161
  *
162
+ * > Read-only endpoint that allows low latency and high read-throughput content delivery.
163
+ *
151
164
  * Project settings -> API Access -> High Performance Read-only Content API
152
165
  */
153
166
  hygraphEndpoint: Scalars['String'];
167
+ /**
168
+ * Content API. **Only used for migrations.**
169
+ *
170
+ * > Regular read & write endpoint that allows querying and mutating data in your project.
171
+ *
172
+ * Project settings -> API Access -> Content API
173
+ */
174
+ hygraphWriteAccessEndpoint?: InputMaybe<Scalars['String']>;
175
+ /**
176
+ * Hygraph Management SDK Authorization Token. **Only used for migrations.**
177
+ *
178
+ * Project settings -> API Access -> Permanent Auth Tokens
179
+ *
180
+ * 1. Click 'Add token' and give it a name, something like 'GraphCommerce Write Access Token' and keep stage on 'Published'.
181
+ * 2. Under 'Management API', click 'Yes, Initialize defaults'
182
+ * 3. Click 'Edit Permissions' and enable: 'Update' and 'Delete' permissions for 'models', 'enumerations', 'fields', 'components' and 'sources'
183
+ * - Update existing models
184
+ * - Delete existing models
185
+ * - Update existing fields
186
+ * - Delete existing fields
187
+ * - Update existing enumerations
188
+ * - Delete existing enumerations
189
+ * - Update existing components
190
+ * - Delete existing components
191
+ * - Update remote sources
192
+ * - Delete remote sources
193
+ *
194
+ * ```
195
+ * GC_HYGRAPH_WRITE_ACCESS_ENDPOINT="https://...hygraph.com/v2/..."
196
+ * GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph"
197
+ * yarn graphcommerce hygraph-migrate
198
+ * ```
199
+ */
200
+ hygraphWriteAccessToken?: InputMaybe<Scalars['String']>;
154
201
  /**
155
202
  * On older versions of GraphCommerce products would use a product type specific route.
156
203
  *
@@ -280,10 +327,14 @@ export const isDefinedNonNullAny = (v: any): v is definedNonNullAny => v !== und
280
327
 
281
328
  export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny(v));
282
329
 
330
+ export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON']);
331
+
283
332
  export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerceConfig>> {
284
333
  return z.object<Properties<GraphCommerceConfig>>({
285
334
  canonicalBaseUrl: z.string().min(1),
286
335
  cartDisplayPricesInclTax: z.boolean().nullish(),
336
+ compare: z.boolean().nullish(),
337
+ compareVariant: CompareVariantSchema.nullish(),
287
338
  customerRequireEmailConfirmation: z.boolean().nullish(),
288
339
  debug: GraphCommerceDebugConfigSchema().nullish(),
289
340
  demoMode: z.boolean().nullish(),
@@ -291,6 +342,8 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
291
342
  googleRecaptchaKey: z.string().nullish(),
292
343
  googleTagmanagerId: z.string().nullish(),
293
344
  hygraphEndpoint: z.string().min(1),
345
+ hygraphWriteAccessEndpoint: z.string().nullish(),
346
+ hygraphWriteAccessToken: z.string().nullish(),
294
347
  legacyProductRoute: z.boolean().nullish(),
295
348
  limitSsg: z.boolean().nullish(),
296
349
  magentoEndpoint: z.string().min(1),