@graphcommerce/magento-customer 9.0.0-canary.56 → 9.0.0-canary.58

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,13 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.0-canary.58
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2330](https://github.com/graphcommerce-org/graphcommerce/pull/2330) [`8de9c13`](https://github.com/graphcommerce-org/graphcommerce/commit/8de9c13b977633104ab81ce04def1dd6d1d4411b) - Added support X-Magento-Cache-Id to allow Varnish to cache requests that are made in the browser while users are logged in. For example the products query can now be cached for logged in users. Functionality can be disabled by setting `customerXMagentoCacheIdDisable: true` in your configuration. ([@paales](https://github.com/paales))
8
+
9
+ ## 9.0.0-canary.57
10
+
3
11
  ## 9.0.0-canary.56
4
12
 
5
13
  ## 9.0.0-canary.55
6
14
 
7
15
  ### Minor Changes
8
16
 
9
- - [#2324](https://github.com/graphcommerce-org/graphcommerce/pull/2324) [`1c8b1e4`](https://github.com/graphcommerce-org/graphcommerce/commit/1c8b1e441ac44935bfd2215d62a71c02b3ba7e6f) - Implement the contactUs mutation, add contact us overlay
10
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
17
+ - [#2324](https://github.com/graphcommerce-org/graphcommerce/pull/2324) [`1c8b1e4`](https://github.com/graphcommerce-org/graphcommerce/commit/1c8b1e441ac44935bfd2215d62a71c02b3ba7e6f) - Implement the contactUs mutation, add contact us overlay ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
11
18
 
12
19
  ## 9.0.0-canary.54
13
20
 
@@ -17,8 +24,7 @@
17
24
 
18
25
  ### Minor Changes
19
26
 
20
- - [#2320](https://github.com/graphcommerce-org/graphcommerce/pull/2320) [`dc5e85c`](https://github.com/graphcommerce-org/graphcommerce/commit/dc5e85c95dad6145fde02a6e54f0fbd1cdfe9e3d) - Replace depricated updateCustomer mutations with updateCustomerV2
21
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
27
+ - [#2320](https://github.com/graphcommerce-org/graphcommerce/pull/2320) [`dc5e85c`](https://github.com/graphcommerce-org/graphcommerce/commit/dc5e85c95dad6145fde02a6e54f0fbd1cdfe9e3d) - Replace depricated updateCustomer mutations with updateCustomerV2 ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
22
28
 
23
29
  ## 8.1.0-canary.51
24
30
 
@@ -28,22 +34,19 @@
28
34
 
29
35
  ### Patch Changes
30
36
 
31
- - [#2317](https://github.com/graphcommerce-org/graphcommerce/pull/2317) [`ff95ab3`](https://github.com/graphcommerce-org/graphcommerce/commit/ff95ab31ee6e00c86cd9e96031f7babbd20e4280) - useSignInForm now optionally expects an email
32
- ([@paales](https://github.com/paales))
37
+ - [#2317](https://github.com/graphcommerce-org/graphcommerce/pull/2317) [`ff95ab3`](https://github.com/graphcommerce-org/graphcommerce/commit/ff95ab31ee6e00c86cd9e96031f7babbd20e4280) - useSignInForm now optionally expects an email ([@paales](https://github.com/paales))
33
38
 
34
39
  ## 8.1.0-canary.48
35
40
 
36
41
  ### Minor Changes
37
42
 
38
- - [#2319](https://github.com/graphcommerce-org/graphcommerce/pull/2319) [`a3409e8`](https://github.com/graphcommerce-org/graphcommerce/commit/a3409e8a629ee95413da6547cbdcf48aa2502c23) - Created a new TelephoneElement component to make re-use easier
39
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
43
+ - [#2319](https://github.com/graphcommerce-org/graphcommerce/pull/2319) [`a3409e8`](https://github.com/graphcommerce-org/graphcommerce/commit/a3409e8a629ee95413da6547cbdcf48aa2502c23) - Created a new TelephoneElement component to make re-use easier ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
40
44
 
41
45
  ## 8.1.0-canary.47
42
46
 
43
47
  ### Minor Changes
44
48
 
45
- - [#2315](https://github.com/graphcommerce-org/graphcommerce/pull/2315) [`fb9118e`](https://github.com/graphcommerce-org/graphcommerce/commit/fb9118ec819d1b507d4fbde04f2ca34ec01ecf49) - Add guestOrder functionality, remove `size: 'max'` from getStaticProps
46
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
49
+ - [#2315](https://github.com/graphcommerce-org/graphcommerce/pull/2315) [`fb9118e`](https://github.com/graphcommerce-org/graphcommerce/commit/fb9118ec819d1b507d4fbde04f2ca34ec01ecf49) - Add guestOrder functionality, remove `size: 'max'` from getStaticProps ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
47
50
 
48
51
  ## 8.1.0-canary.46
49
52
 
@@ -61,8 +64,7 @@
61
64
 
62
65
  ### Minor Changes
63
66
 
64
- - [#2306](https://github.com/graphcommerce-org/graphcommerce/pull/2306) [`5e188e8`](https://github.com/graphcommerce-org/graphcommerce/commit/5e188e830dca4730c73830858f59a94e9d41ed12) - Add delete account functionality to the account section. Disabled by default and can be enabled through the config.
65
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
67
+ - [#2306](https://github.com/graphcommerce-org/graphcommerce/pull/2306) [`5e188e8`](https://github.com/graphcommerce-org/graphcommerce/commit/5e188e830dca4730c73830858f59a94e9d41ed12) - Add delete account functionality to the account section. Disabled by default and can be enabled through the config. ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
66
68
 
67
69
  ## 8.1.0-canary.39
68
70
 
@@ -70,13 +72,11 @@
70
72
 
71
73
  ### Minor Changes
72
74
 
73
- - [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Add company and vat fields to shipping and billing forms
74
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
75
+ - [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Add company and vat fields to shipping and billing forms ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
75
76
 
76
77
  ### Patch Changes
77
78
 
78
- - [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Fix bug with persist not applying saved changes by moving <FromPersist/> below the form components
79
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
79
+ - [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Fix bug with persist not applying saved changes by moving <FromPersist/> below the form components ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
80
80
 
81
81
  ## 8.1.0-canary.37
82
82
 
@@ -86,13 +86,11 @@
86
86
 
87
87
  ### Minor Changes
88
88
 
89
- - [#2301](https://github.com/graphcommerce-org/graphcommerce/pull/2301) [`47bb47b`](https://github.com/graphcommerce-org/graphcommerce/commit/47bb47bac4b3689a6859afbc587274d813e0b072) - Implement confirm email functionality
90
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
89
+ - [#2301](https://github.com/graphcommerce-org/graphcommerce/pull/2301) [`47bb47b`](https://github.com/graphcommerce-org/graphcommerce/commit/47bb47bac4b3689a6859afbc587274d813e0b072) - Implement confirm email functionality ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
91
90
 
92
91
  ### Patch Changes
93
92
 
94
- - [#2301](https://github.com/graphcommerce-org/graphcommerce/pull/2301) [`13d0649`](https://github.com/graphcommerce-org/graphcommerce/commit/13d06498d121f93b52c25930e50aa3b0bd12a818) - Created a new EmailElement component to make re-use easier
95
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
93
+ - [#2301](https://github.com/graphcommerce-org/graphcommerce/pull/2301) [`13d0649`](https://github.com/graphcommerce-org/graphcommerce/commit/13d06498d121f93b52c25930e50aa3b0bd12a818) - Created a new EmailElement component to make re-use easier ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
96
94
 
97
95
  ## 8.1.0-canary.34
98
96
 
@@ -122,8 +120,7 @@
122
120
 
123
121
  ### Patch Changes
124
122
 
125
- - [#2283](https://github.com/graphcommerce-org/graphcommerce/pull/2283) [`170aebd`](https://github.com/graphcommerce-org/graphcommerce/commit/170aebde3fb0705504e6d0919e7fbad0b89c1197) - Prevent success message from showing up when form is still submitting a new request to update the users email
126
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
123
+ - [#2283](https://github.com/graphcommerce-org/graphcommerce/pull/2283) [`170aebd`](https://github.com/graphcommerce-org/graphcommerce/commit/170aebde3fb0705504e6d0919e7fbad0b89c1197) - Prevent success message from showing up when form is still submitting a new request to update the users email ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
127
124
 
128
125
  ## 8.1.0-canary.21
129
126
 
@@ -167,11 +164,9 @@
167
164
 
168
165
  ### Patch Changes
169
166
 
170
- - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores
171
- ([@FrankHarland](https://github.com/FrankHarland))
167
+ - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores ([@FrankHarland](https://github.com/FrankHarland))
172
168
 
173
- - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`530076e`](https://github.com/graphcommerce-org/graphcommerce/commit/530076e3664703cb8b577b7fcf1998a420819f60) - Moved all usages of useFormPersist to the <FormPersist/> component to prevent rerenders.
174
- ([@FrankHarland](https://github.com/FrankHarland))
169
+ - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`530076e`](https://github.com/graphcommerce-org/graphcommerce/commit/530076e3664703cb8b577b7fcf1998a420819f60) - Moved all usages of useFormPersist to the <FormPersist/> component to prevent rerenders. ([@FrankHarland](https://github.com/FrankHarland))
175
170
 
176
171
  ## 8.0.6-canary.1
177
172
 
@@ -181,8 +176,7 @@
181
176
 
182
177
  ### Patch Changes
183
178
 
184
- - [#2243](https://github.com/graphcommerce-org/graphcommerce/pull/2243) [`c2ddb9e`](https://github.com/graphcommerce-org/graphcommerce/commit/c2ddb9e1e9d08b4363cc1ffa31e23d715ab1bdb6) - Solve an issue where the cart wouldn't be merged after the customer created a new account.
185
- ([@paales](https://github.com/paales))
179
+ - [#2243](https://github.com/graphcommerce-org/graphcommerce/pull/2243) [`c2ddb9e`](https://github.com/graphcommerce-org/graphcommerce/commit/c2ddb9e1e9d08b4363cc1ffa31e23d715ab1bdb6) - Solve an issue where the cart wouldn't be merged after the customer created a new account. ([@paales](https://github.com/paales))
186
180
 
187
181
  ## 8.0.5-canary.10
188
182
 
@@ -196,8 +190,7 @@
196
190
 
197
191
  ### Patch Changes
198
192
 
199
- - [#2243](https://github.com/graphcommerce-org/graphcommerce/pull/2243) [`c2ddb9e`](https://github.com/graphcommerce-org/graphcommerce/commit/c2ddb9e1e9d08b4363cc1ffa31e23d715ab1bdb6) - Solve an issue where the cart wouldn't be merged after the customer created a new account.
200
- ([@paales](https://github.com/paales))
193
+ - [#2243](https://github.com/graphcommerce-org/graphcommerce/pull/2243) [`c2ddb9e`](https://github.com/graphcommerce-org/graphcommerce/commit/c2ddb9e1e9d08b4363cc1ffa31e23d715ab1bdb6) - Solve an issue where the cart wouldn't be merged after the customer created a new account. ([@paales](https://github.com/paales))
201
194
 
202
195
  ## 8.0.5-canary.5
203
196
 
@@ -221,17 +214,13 @@
221
214
 
222
215
  ### Patch Changes
223
216
 
224
- - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`6b61a93`](https://github.com/graphcommerce-org/graphcommerce/commit/6b61a93476505e66a3135844b9bce62ccdd1bdcf) - Solve an issue where the customer could not save their region in the customer account section.
225
- ([@paales](https://github.com/paales))
217
+ - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`6b61a93`](https://github.com/graphcommerce-org/graphcommerce/commit/6b61a93476505e66a3135844b9bce62ccdd1bdcf) - Solve an issue where the customer could not save their region in the customer account section. ([@paales](https://github.com/paales))
226
218
 
227
- - [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`3fbf3da`](https://github.com/graphcommerce-org/graphcommerce/commit/3fbf3da8a67f2fbaa7fa974a37cbbf34613844e4) - Solve an issue where the user would be presented with the Session expired dialog when the user would be logging in during the checkout process.
228
- ([@paales](https://github.com/paales))
219
+ - [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`3fbf3da`](https://github.com/graphcommerce-org/graphcommerce/commit/3fbf3da8a67f2fbaa7fa974a37cbbf34613844e4) - Solve an issue where the user would be presented with the Session expired dialog when the user would be logging in during the checkout process. ([@paales](https://github.com/paales))
229
220
 
230
- - [#2207](https://github.com/graphcommerce-org/graphcommerce/pull/2207) [`4d7594c`](https://github.com/graphcommerce-org/graphcommerce/commit/4d7594ca2174f74bfa9f66a464b77b3fd04f3560) - After changing the default shipping or billing address in the account section other address would not properly update
231
- ([@paales](https://github.com/paales))
221
+ - [#2207](https://github.com/graphcommerce-org/graphcommerce/pull/2207) [`4d7594c`](https://github.com/graphcommerce-org/graphcommerce/commit/4d7594ca2174f74bfa9f66a464b77b3fd04f3560) - After changing the default shipping or billing address in the account section other address would not properly update ([@paales](https://github.com/paales))
232
222
 
233
- - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`dbd943d`](https://github.com/graphcommerce-org/graphcommerce/commit/dbd943d9f588f24d5c73bdf35f2d3bbc5e0e3406) - Split out AddressFields into separate components and allow renaming fields.
234
- ([@paales](https://github.com/paales))
223
+ - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`dbd943d`](https://github.com/graphcommerce-org/graphcommerce/commit/dbd943d9f588f24d5c73bdf35f2d3bbc5e0e3406) - Split out AddressFields into separate components and allow renaming fields. ([@paales](https://github.com/paales))
235
224
 
236
225
  ## 8.0.3-canary.6
237
226
 
@@ -239,11 +228,9 @@
239
228
 
240
229
  ### Patch Changes
241
230
 
242
- - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`6b61a93`](https://github.com/graphcommerce-org/graphcommerce/commit/6b61a93476505e66a3135844b9bce62ccdd1bdcf) - Solve an issue where the customer could not save their region in the customer account section.
243
- ([@paales](https://github.com/paales))
231
+ - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`6b61a93`](https://github.com/graphcommerce-org/graphcommerce/commit/6b61a93476505e66a3135844b9bce62ccdd1bdcf) - Solve an issue where the customer could not save their region in the customer account section. ([@paales](https://github.com/paales))
244
232
 
245
- - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`dbd943d`](https://github.com/graphcommerce-org/graphcommerce/commit/dbd943d9f588f24d5c73bdf35f2d3bbc5e0e3406) - Split out AddressFields into separate components and allow renaming fields.
246
- ([@paales](https://github.com/paales))
233
+ - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`dbd943d`](https://github.com/graphcommerce-org/graphcommerce/commit/dbd943d9f588f24d5c73bdf35f2d3bbc5e0e3406) - Split out AddressFields into separate components and allow renaming fields. ([@paales](https://github.com/paales))
247
234
 
248
235
  ## 8.0.3-canary.4
249
236
 
@@ -253,15 +240,13 @@
253
240
 
254
241
  ### Patch Changes
255
242
 
256
- - [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`3fbf3da`](https://github.com/graphcommerce-org/graphcommerce/commit/3fbf3da8a67f2fbaa7fa974a37cbbf34613844e4) - Solve an issue where the user would be presented with the Session expired dialog when the user would be logging in during the checkout process.
257
- ([@paales](https://github.com/paales))
243
+ - [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`3fbf3da`](https://github.com/graphcommerce-org/graphcommerce/commit/3fbf3da8a67f2fbaa7fa974a37cbbf34613844e4) - Solve an issue where the user would be presented with the Session expired dialog when the user would be logging in during the checkout process. ([@paales](https://github.com/paales))
258
244
 
259
245
  ## 8.0.3-canary.1
260
246
 
261
247
  ### Patch Changes
262
248
 
263
- - [#2207](https://github.com/graphcommerce-org/graphcommerce/pull/2207) [`4d7594c`](https://github.com/graphcommerce-org/graphcommerce/commit/4d7594ca2174f74bfa9f66a464b77b3fd04f3560) - After changing the default shipping or billing address in the account section other address would not properly update
264
- ([@paales](https://github.com/paales))
249
+ - [#2207](https://github.com/graphcommerce-org/graphcommerce/pull/2207) [`4d7594c`](https://github.com/graphcommerce-org/graphcommerce/commit/4d7594ca2174f74bfa9f66a464b77b3fd04f3560) - After changing the default shipping or billing address in the account section other address would not properly update ([@paales](https://github.com/paales))
265
250
 
266
251
  ## 8.0.3-canary.0
267
252
 
@@ -269,8 +254,7 @@
269
254
 
270
255
  ### Patch Changes
271
256
 
272
- - [#2197](https://github.com/graphcommerce-org/graphcommerce/pull/2197) [`044331c`](https://github.com/graphcommerce-org/graphcommerce/commit/044331cf1ea3a6040cfe8e0f79fb62025d5a9d90) - Revert: Change sorting for customer orders in Descending Created at order
273
- ([@paales](https://github.com/paales))
257
+ - [#2197](https://github.com/graphcommerce-org/graphcommerce/pull/2197) [`044331c`](https://github.com/graphcommerce-org/graphcommerce/commit/044331cf1ea3a6040cfe8e0f79fb62025d5a9d90) - Revert: Change sorting for customer orders in Descending Created at order ([@paales](https://github.com/paales))
274
258
 
275
259
  ## 8.0.2-canary.3
276
260
 
@@ -278,8 +262,7 @@
278
262
 
279
263
  ### Patch Changes
280
264
 
281
- - [#2197](https://github.com/graphcommerce-org/graphcommerce/pull/2197) [`044331c`](https://github.com/graphcommerce-org/graphcommerce/commit/044331cf1ea3a6040cfe8e0f79fb62025d5a9d90) - Revert: Change sorting for customer orders in Descending Created at order
282
- ([@paales](https://github.com/paales))
265
+ - [#2197](https://github.com/graphcommerce-org/graphcommerce/pull/2197) [`044331c`](https://github.com/graphcommerce-org/graphcommerce/commit/044331cf1ea3a6040cfe8e0f79fb62025d5a9d90) - Revert: Change sorting for customer orders in Descending Created at order ([@paales](https://github.com/paales))
283
266
 
284
267
  ## 8.0.2-canary.1
285
268
 
@@ -289,24 +272,19 @@
289
272
 
290
273
  ### Patch Changes
291
274
 
292
- - [#2177](https://github.com/graphcommerce-org/graphcommerce/pull/2177) [`816d789`](https://github.com/graphcommerce-org/graphcommerce/commit/816d7893159528bbe4ffc51c3958c806b81b58b0) - Change sorting for customer orders in Descending Created at order
293
- ([@LaurensFranken](https://github.com/LaurensFranken))
275
+ - [#2177](https://github.com/graphcommerce-org/graphcommerce/pull/2177) [`816d789`](https://github.com/graphcommerce-org/graphcommerce/commit/816d7893159528bbe4ffc51c3958c806b81b58b0) - Change sorting for customer orders in Descending Created at order ([@LaurensFranken](https://github.com/LaurensFranken))
294
276
 
295
- - [#2191](https://github.com/graphcommerce-org/graphcommerce/pull/2191) [`13ffa6b`](https://github.com/graphcommerce-org/graphcommerce/commit/13ffa6b945f1c72bf1fdc9298e4ce5dd76b48d73) - When a user was logging in from the checkout react would be caught in an infinite loop and thus the page would hang
296
- ([@JoshuaS98](https://github.com/JoshuaS98))
277
+ - [#2191](https://github.com/graphcommerce-org/graphcommerce/pull/2191) [`13ffa6b`](https://github.com/graphcommerce-org/graphcommerce/commit/13ffa6b945f1c72bf1fdc9298e4ce5dd76b48d73) - When a user was logging in from the checkout react would be caught in an infinite loop and thus the page would hang ([@JoshuaS98](https://github.com/JoshuaS98))
297
278
 
298
- - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`09a2cc3`](https://github.com/graphcommerce-org/graphcommerce/commit/09a2cc35ceb5e714ffd02e573eebe7de842ae327) - Do not try to automatically invalidate the current token and fully rely on the Session Expired dialog
299
- ([@paales](https://github.com/paales))
279
+ - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`09a2cc3`](https://github.com/graphcommerce-org/graphcommerce/commit/09a2cc35ceb5e714ffd02e573eebe7de842ae327) - Do not try to automatically invalidate the current token and fully rely on the Session Expired dialog ([@paales](https://github.com/paales))
300
280
 
301
- - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`ee969bf`](https://github.com/graphcommerce-org/graphcommerce/commit/ee969bfc5415392747b04e0484685f5c611a2559) - After signing out the currentCartId was still returning a value causing the cart to be shown after signing out
302
- ([@paales](https://github.com/paales))
281
+ - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`ee969bf`](https://github.com/graphcommerce-org/graphcommerce/commit/ee969bfc5415392747b04e0484685f5c611a2559) - After signing out the currentCartId was still returning a value causing the cart to be shown after signing out ([@paales](https://github.com/paales))
303
282
 
304
283
  ## 8.0.1-canary.4
305
284
 
306
285
  ### Patch Changes
307
286
 
308
- - [#2191](https://github.com/graphcommerce-org/graphcommerce/pull/2191) [`13ffa6b`](https://github.com/graphcommerce-org/graphcommerce/commit/13ffa6b945f1c72bf1fdc9298e4ce5dd76b48d73) - When a user was logging in from the checkout react would be caught in an infinite loop and thus the page would hang
309
- ([@JoshuaS98](https://github.com/JoshuaS98))
287
+ - [#2191](https://github.com/graphcommerce-org/graphcommerce/pull/2191) [`13ffa6b`](https://github.com/graphcommerce-org/graphcommerce/commit/13ffa6b945f1c72bf1fdc9298e4ce5dd76b48d73) - When a user was logging in from the checkout react would be caught in an infinite loop and thus the page would hang ([@JoshuaS98](https://github.com/JoshuaS98))
310
288
 
311
289
  ## 8.0.1-canary.3
312
290
 
@@ -314,8 +292,7 @@
314
292
 
315
293
  ### Patch Changes
316
294
 
317
- - [#2177](https://github.com/graphcommerce-org/graphcommerce/pull/2177) [`816d789`](https://github.com/graphcommerce-org/graphcommerce/commit/816d7893159528bbe4ffc51c3958c806b81b58b0) - Change sorting for customer orders in Descending Created at order
318
- ([@LaurensFranken](https://github.com/LaurensFranken))
295
+ - [#2177](https://github.com/graphcommerce-org/graphcommerce/pull/2177) [`816d789`](https://github.com/graphcommerce-org/graphcommerce/commit/816d7893159528bbe4ffc51c3958c806b81b58b0) - Change sorting for customer orders in Descending Created at order ([@LaurensFranken](https://github.com/LaurensFranken))
319
296
 
320
297
  ## 8.0.1-canary.1
321
298
 
@@ -323,18 +300,15 @@
323
300
 
324
301
  ### Patch Changes
325
302
 
326
- - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`09a2cc3`](https://github.com/graphcommerce-org/graphcommerce/commit/09a2cc35ceb5e714ffd02e573eebe7de842ae327) - Do not try to automatically invalidate the current token and fully rely on the Session Expired dialog
327
- ([@paales](https://github.com/paales))
303
+ - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`09a2cc3`](https://github.com/graphcommerce-org/graphcommerce/commit/09a2cc35ceb5e714ffd02e573eebe7de842ae327) - Do not try to automatically invalidate the current token and fully rely on the Session Expired dialog ([@paales](https://github.com/paales))
328
304
 
329
- - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`ee969bf`](https://github.com/graphcommerce-org/graphcommerce/commit/ee969bfc5415392747b04e0484685f5c611a2559) - After signing out the currentCartId was still returning a value causing the cart to be shown after signing out
330
- ([@paales](https://github.com/paales))
305
+ - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`ee969bf`](https://github.com/graphcommerce-org/graphcommerce/commit/ee969bfc5415392747b04e0484685f5c611a2559) - After signing out the currentCartId was still returning a value causing the cart to be shown after signing out ([@paales](https://github.com/paales))
331
306
 
332
307
  ## 8.0.0
333
308
 
334
309
  ### Minor Changes
335
310
 
336
- - [#2175](https://github.com/graphcommerce-org/graphcommerce/pull/2175) [`a6bcb87`](https://github.com/graphcommerce-org/graphcommerce/commit/a6bcb8785d54ef735d82154a775822d84f2b2b80) - Autofill country dropdown in CreateCustomerAddressForm so AddPostcodeNLAddressFields plugin works by default
337
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
311
+ - [#2175](https://github.com/graphcommerce-org/graphcommerce/pull/2175) [`a6bcb87`](https://github.com/graphcommerce-org/graphcommerce/commit/a6bcb8785d54ef735d82154a775822d84f2b2b80) - Autofill country dropdown in CreateCustomerAddressForm so AddPostcodeNLAddressFields plugin works by default ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
338
312
 
339
313
  - [#2110](https://github.com/graphcommerce-org/graphcommerce/pull/2110) [`d2e716d`](https://github.com/graphcommerce-org/graphcommerce/commit/d2e716d437fcfed13388ef536a8e73513744027b) - ---
340
314
 
@@ -348,38 +322,27 @@
348
322
 
349
323
  ### Patch Changes
350
324
 
351
- - [#2091](https://github.com/graphcommerce-org/graphcommerce/pull/2091) [`5b865d3`](https://github.com/graphcommerce-org/graphcommerce/commit/5b865d376fe3b830a03af15b56986a0448af4987) - Order details page in the customer account section is completely redesigned to be more in line with other areas.
352
- ([@StefanAngenent](https://github.com/StefanAngenent))
325
+ - [#2091](https://github.com/graphcommerce-org/graphcommerce/pull/2091) [`5b865d3`](https://github.com/graphcommerce-org/graphcommerce/commit/5b865d376fe3b830a03af15b56986a0448af4987) - Order details page in the customer account section is completely redesigned to be more in line with other areas. ([@StefanAngenent](https://github.com/StefanAngenent))
353
326
 
354
- - [#2048](https://github.com/graphcommerce-org/graphcommerce/pull/2048) [`a5c6550`](https://github.com/graphcommerce-org/graphcommerce/commit/a5c65506a7e72bd9ea101f665ce201e82396c63c) - Allow passing skip to useCustomerQuery and useGuestQuery
355
- ([@Jessevdpoel](https://github.com/Jessevdpoel))
327
+ - [#2048](https://github.com/graphcommerce-org/graphcommerce/pull/2048) [`a5c6550`](https://github.com/graphcommerce-org/graphcommerce/commit/a5c65506a7e72bd9ea101f665ce201e82396c63c) - Allow passing skip to useCustomerQuery and useGuestQuery ([@Jessevdpoel](https://github.com/Jessevdpoel))
356
328
 
357
- - [#2170](https://github.com/graphcommerce-org/graphcommerce/pull/2170) [`f3e906f`](https://github.com/graphcommerce-org/graphcommerce/commit/f3e906f7e374ce22d36af29c0f3c8153e18300e6) - Solved an issue where the inactive cart would set as the current cart when the customer had signed in, checked out their cart, session expired and tried to log in again.
358
- ([@FrankHarland](https://github.com/FrankHarland))
329
+ - [#2170](https://github.com/graphcommerce-org/graphcommerce/pull/2170) [`f3e906f`](https://github.com/graphcommerce-org/graphcommerce/commit/f3e906f7e374ce22d36af29c0f3c8153e18300e6) - Solved an issue where the inactive cart would set as the current cart when the customer had signed in, checked out their cart, session expired and tried to log in again. ([@FrankHarland](https://github.com/FrankHarland))
359
330
 
360
- - [#2107](https://github.com/graphcommerce-org/graphcommerce/pull/2107) [`2f51504`](https://github.com/graphcommerce-org/graphcommerce/commit/2f5150456eabcce410ad8a0f1cbebeedabb6564c) - Remember email adress when going from checkout to signin/up form
361
- ([@FrankHarland](https://github.com/FrankHarland))
331
+ - [#2107](https://github.com/graphcommerce-org/graphcommerce/pull/2107) [`2f51504`](https://github.com/graphcommerce-org/graphcommerce/commit/2f5150456eabcce410ad8a0f1cbebeedabb6564c) - Remember email adress when going from checkout to signin/up form ([@FrankHarland](https://github.com/FrankHarland))
362
332
 
363
- - [#2128](https://github.com/graphcommerce-org/graphcommerce/pull/2128) [`2320f8f`](https://github.com/graphcommerce-org/graphcommerce/commit/2320f8fa28713f45f0a9ecfc7d8623120add2a9a) - Fixed bug which caused region to not be set properly if user swapped countries in the checkout process.
364
- ([@Jessevdpoel](https://github.com/Jessevdpoel))
333
+ - [#2128](https://github.com/graphcommerce-org/graphcommerce/pull/2128) [`2320f8f`](https://github.com/graphcommerce-org/graphcommerce/commit/2320f8fa28713f45f0a9ecfc7d8623120add2a9a) - Fixed bug which caused region to not be set properly if user swapped countries in the checkout process. ([@Jessevdpoel](https://github.com/Jessevdpoel))
365
334
 
366
- - [#1999](https://github.com/graphcommerce-org/graphcommerce/pull/1999) [`ab834fb`](https://github.com/graphcommerce-org/graphcommerce/commit/ab834fbfe057fb507c371a6d22af282cc1b195d4) - Added a new 'Session expired' dialog that is shown when a GraphQL query or mutation returns a `graphql-authorization` error. This error is returned when the user's session has expired. The dialog allows the user to sign in again and then the query or mutation is re-executed.
367
- ([@paales](https://github.com/paales))
335
+ - [#1999](https://github.com/graphcommerce-org/graphcommerce/pull/1999) [`ab834fb`](https://github.com/graphcommerce-org/graphcommerce/commit/ab834fbfe057fb507c371a6d22af282cc1b195d4) - Added a new 'Session expired' dialog that is shown when a GraphQL query or mutation returns a `graphql-authorization` error. This error is returned when the user's session has expired. The dialog allows the user to sign in again and then the query or mutation is re-executed. ([@paales](https://github.com/paales))
368
336
 
369
- - [#2166](https://github.com/graphcommerce-org/graphcommerce/pull/2166) [`304b816`](https://github.com/graphcommerce-org/graphcommerce/commit/304b81659caf82d9f500401d21da4110dd40db61) - When a user is logged in the modal is dismissed immediately without showing a succes page. This speeds up the interaction with the site.
370
- ([@FrankHarland](https://github.com/FrankHarland))
337
+ - [#2166](https://github.com/graphcommerce-org/graphcommerce/pull/2166) [`304b816`](https://github.com/graphcommerce-org/graphcommerce/commit/304b81659caf82d9f500401d21da4110dd40db61) - When a user is logged in the modal is dismissed immediately without showing a succes page. This speeds up the interaction with the site. ([@FrankHarland](https://github.com/FrankHarland))
371
338
 
372
- - [#1999](https://github.com/graphcommerce-org/graphcommerce/pull/1999) [`c11f3b8`](https://github.com/graphcommerce-org/graphcommerce/commit/c11f3b88f187bb8e0059a6940b9835a076e5faf8) - Created a `debug.sessions` config that allows debugging sessions. Enable with `GC_DEBUG_SESSIONS=1` in your env or modify your graphcommerce.config.js
373
- ([@paales](https://github.com/paales))
339
+ - [#1999](https://github.com/graphcommerce-org/graphcommerce/pull/1999) [`c11f3b8`](https://github.com/graphcommerce-org/graphcommerce/commit/c11f3b88f187bb8e0059a6940b9835a076e5faf8) - Created a `debug.sessions` config that allows debugging sessions. Enable with `GC_DEBUG_SESSIONS=1` in your env or modify your graphcommerce.config.js ([@paales](https://github.com/paales))
374
340
 
375
- - [#2087](https://github.com/graphcommerce-org/graphcommerce/pull/2087) [`42c33c6`](https://github.com/graphcommerce-org/graphcommerce/commit/42c33c6e3adceee400bc9f10ec416731db9279c0) - The message when the email was updated was unstyled.
376
- ([@StefanAngenent](https://github.com/StefanAngenent))
341
+ - [#2087](https://github.com/graphcommerce-org/graphcommerce/pull/2087) [`42c33c6`](https://github.com/graphcommerce-org/graphcommerce/commit/42c33c6e3adceee400bc9f10ec416731db9279c0) - The message when the email was updated was unstyled. ([@StefanAngenent](https://github.com/StefanAngenent))
377
342
 
378
- - [#2082](https://github.com/graphcommerce-org/graphcommerce/pull/2082) [`2e8d19c`](https://github.com/graphcommerce-org/graphcommerce/commit/2e8d19cccd305f0e8eb4c29d05161af6cfdb9d84) - Add 'Current email' translation
379
- ([@StefanAngenent](https://github.com/StefanAngenent))
343
+ - [#2082](https://github.com/graphcommerce-org/graphcommerce/pull/2082) [`2e8d19c`](https://github.com/graphcommerce-org/graphcommerce/commit/2e8d19cccd305f0e8eb4c29d05161af6cfdb9d84) - Add 'Current email' translation ([@StefanAngenent](https://github.com/StefanAngenent))
380
344
 
381
- - [#2098](https://github.com/graphcommerce-org/graphcommerce/pull/2098) [`ca45472`](https://github.com/graphcommerce-org/graphcommerce/commit/ca45472246e084f4b88f91bc700351e29c63e0e2) - Fix `<EditAddressForm />` when addition field is null or undefined
382
- ([@JoshuaS98](https://github.com/JoshuaS98))
345
+ - [#2098](https://github.com/graphcommerce-org/graphcommerce/pull/2098) [`ca45472`](https://github.com/graphcommerce-org/graphcommerce/commit/ca45472246e084f4b88f91bc700351e29c63e0e2) - Fix `<EditAddressForm />` when addition field is null or undefined ([@JoshuaS98](https://github.com/JoshuaS98))
383
346
 
384
347
  ## 8.0.0-canary.100
385
348
 
@@ -391,8 +354,7 @@
391
354
 
392
355
  ### Minor Changes
393
356
 
394
- - [#2175](https://github.com/graphcommerce-org/graphcommerce/pull/2175) [`a6bcb87`](https://github.com/graphcommerce-org/graphcommerce/commit/a6bcb8785d54ef735d82154a775822d84f2b2b80) - Autofill country dropdown in CreateCustomerAddressForm so AddPostcodeNLAddressFields plugin works by default
395
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
357
+ - [#2175](https://github.com/graphcommerce-org/graphcommerce/pull/2175) [`a6bcb87`](https://github.com/graphcommerce-org/graphcommerce/commit/a6bcb8785d54ef735d82154a775822d84f2b2b80) - Autofill country dropdown in CreateCustomerAddressForm so AddPostcodeNLAddressFields plugin works by default ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
396
358
 
397
359
  ## 8.0.0-canary.96
398
360
 
@@ -410,8 +372,7 @@
410
372
 
411
373
  ### Patch Changes
412
374
 
413
- - [#2170](https://github.com/graphcommerce-org/graphcommerce/pull/2170) [`f3e906f`](https://github.com/graphcommerce-org/graphcommerce/commit/f3e906f7e374ce22d36af29c0f3c8153e18300e6) - fix(GCOM-1317): fix bug where inactive cached cart could be set as currentCartId
414
- ([@FrankHarland](https://github.com/FrankHarland))
375
+ - [#2170](https://github.com/graphcommerce-org/graphcommerce/pull/2170) [`f3e906f`](https://github.com/graphcommerce-org/graphcommerce/commit/f3e906f7e374ce22d36af29c0f3c8153e18300e6) - fix(GCOM-1317): fix bug where inactive cached cart could be set as currentCartId ([@FrankHarland](https://github.com/FrankHarland))
415
376
 
416
377
  ## 8.0.0-canary.89
417
378
 
@@ -419,8 +380,7 @@
419
380
 
420
381
  ### Patch Changes
421
382
 
422
- - [#2166](https://github.com/graphcommerce-org/graphcommerce/pull/2166) [`304b816`](https://github.com/graphcommerce-org/graphcommerce/commit/304b81659caf82d9f500401d21da4110dd40db61) - Dismiss login page and go back to previous page asap when logging in
423
- ([@FrankHarland](https://github.com/FrankHarland))
383
+ - [#2166](https://github.com/graphcommerce-org/graphcommerce/pull/2166) [`304b816`](https://github.com/graphcommerce-org/graphcommerce/commit/304b81659caf82d9f500401d21da4110dd40db61) - Dismiss login page and go back to previous page asap when logging in ([@FrankHarland](https://github.com/FrankHarland))
424
384
 
425
385
  ## 8.0.0-canary.87
426
386
 
@@ -460,8 +420,7 @@
460
420
 
461
421
  ### Patch Changes
462
422
 
463
- - [#2128](https://github.com/graphcommerce-org/graphcommerce/pull/2128) [`2320f8f`](https://github.com/graphcommerce-org/graphcommerce/commit/2320f8fa28713f45f0a9ecfc7d8623120add2a9a) - Fixed bug which caused region to not be set properly if user swapped countries in the checkout process.
464
- ([@Jessevdpoel](https://github.com/Jessevdpoel))
423
+ - [#2128](https://github.com/graphcommerce-org/graphcommerce/pull/2128) [`2320f8f`](https://github.com/graphcommerce-org/graphcommerce/commit/2320f8fa28713f45f0a9ecfc7d8623120add2a9a) - Fixed bug which caused region to not be set properly if user swapped countries in the checkout process. ([@Jessevdpoel](https://github.com/Jessevdpoel))
465
424
 
466
425
  ## 8.0.0-canary.69
467
426
 
@@ -469,11 +428,9 @@
469
428
 
470
429
  ### Patch Changes
471
430
 
472
- - [#1999](https://github.com/graphcommerce-org/graphcommerce/pull/1999) [`ab834fb`](https://github.com/graphcommerce-org/graphcommerce/commit/ab834fbfe057fb507c371a6d22af282cc1b195d4) - Added user session reevaluation after unathenticated call. Queries will be paused untill user has signed in again
473
- ([@paales](https://github.com/paales))
431
+ - [#1999](https://github.com/graphcommerce-org/graphcommerce/pull/1999) [`ab834fb`](https://github.com/graphcommerce-org/graphcommerce/commit/ab834fbfe057fb507c371a6d22af282cc1b195d4) - Added user session reevaluation after unathenticated call. Queries will be paused untill user has signed in again ([@paales](https://github.com/paales))
474
432
 
475
- - [#1999](https://github.com/graphcommerce-org/graphcommerce/pull/1999) [`c11f3b8`](https://github.com/graphcommerce-org/graphcommerce/commit/c11f3b88f187bb8e0059a6940b9835a076e5faf8) - Created a debug.sessions config that allows debugging sessions. Enable with GC_DEBUG_SESSIONS=1 in your env or modify your graphcommerce.config.js
476
- ([@paales](https://github.com/paales))
433
+ - [#1999](https://github.com/graphcommerce-org/graphcommerce/pull/1999) [`c11f3b8`](https://github.com/graphcommerce-org/graphcommerce/commit/c11f3b88f187bb8e0059a6940b9835a076e5faf8) - Created a debug.sessions config that allows debugging sessions. Enable with GC_DEBUG_SESSIONS=1 in your env or modify your graphcommerce.config.js ([@paales](https://github.com/paales))
477
434
 
478
435
  ## 7.1.0-canary.67
479
436
 
@@ -1908,31 +1865,31 @@
1908
1865
  All occurences of `<Trans>` and `t` need to be replaced:
1909
1866
 
1910
1867
  ```tsx
1911
- import { Trans, t } from "@lingui/macro";
1868
+ import { Trans, t } from '@lingui/macro'
1912
1869
 
1913
1870
  function MyComponent() {
1914
- const foo = "bar";
1871
+ const foo = 'bar'
1915
1872
  return (
1916
1873
  <div aria-label={t`Account ${foo}`}>
1917
1874
  <Trans>My Translation {foo}</Trans>
1918
1875
  </div>
1919
- );
1876
+ )
1920
1877
  }
1921
1878
  ```
1922
1879
 
1923
1880
  Needs to be replaced with:
1924
1881
 
1925
1882
  ```tsx
1926
- import { Trans } from "@lingui/react";
1927
- import { i18n } from "@lingui/core";
1883
+ import { Trans } from '@lingui/react'
1884
+ import { i18n } from '@lingui/core'
1928
1885
 
1929
1886
  function MyComponent() {
1930
- const foo = "bar";
1887
+ const foo = 'bar'
1931
1888
  return (
1932
1889
  <div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
1933
- <Trans key="My Translation {foo}" values={{ foo }}></Trans>
1890
+ <Trans key='My Translation {foo}' values={{ foo }}></Trans>
1934
1891
  </div>
1935
- );
1892
+ )
1936
1893
  }
1937
1894
  ```
1938
1895
 
package/Config.graphqls CHANGED
@@ -14,6 +14,13 @@ extend input GraphCommerceConfig {
14
14
  Enable customer account deletion through the account section
15
15
  """
16
16
  customerDeleteEnabled: Boolean
17
+
18
+ """
19
+ X-Magento-Cache-Id allows Varnish to cache requests that are made in the browser while users are logged in. For example the products query can now be cached for logged in users.
20
+
21
+ This can be disabled when Varnish is running out of available memory.
22
+ """
23
+ customerXMagentoCacheIdDisable: Boolean
17
24
  }
18
25
 
19
26
  extend input GraphCommerceDebugConfig {
@@ -1,7 +1,9 @@
1
1
  query CustomerToken {
2
2
  customerToken @client {
3
+ __typename
3
4
  ...CustomerTokenFragment
4
5
  createdAt
5
6
  valid
7
+ xMagentoCacheId
6
8
  }
7
9
  }
@@ -1,5 +1,11 @@
1
1
  import { globalApolloClient } from '@graphcommerce/graphql'
2
- import { ApolloLink, fromPromise, onError, setContext } from '@graphcommerce/graphql/apollo'
2
+ import {
3
+ ApolloCache,
4
+ ApolloLink,
5
+ fromPromise,
6
+ onError,
7
+ setContext,
8
+ } from '@graphcommerce/graphql/apollo'
3
9
  import { ErrorCategory } from '@graphcommerce/magento-graphql'
4
10
  import type { GraphQLError } from 'graphql'
5
11
  import { NextRouter } from 'next/router'
@@ -8,6 +14,13 @@ import { CustomerTokenDocument } from '../hooks'
8
14
 
9
15
  export type PushRouter = Pick<NextRouter, 'push' | 'events'>
10
16
 
17
+ declare module '@apollo/client' {
18
+ interface DefaultContext {
19
+ cache?: ApolloCache<unknown>
20
+ headers?: Record<string, string>
21
+ }
22
+ }
23
+
11
24
  async function pushWithPromise(router: Pick<NextRouter, 'push' | 'events'>, url: string) {
12
25
  try {
13
26
  await router.push(url)
@@ -45,7 +58,7 @@ const addTokenHeader = setContext((_, context) => {
45
58
  if (!context.headers) context.headers = {}
46
59
 
47
60
  try {
48
- const query = context.cache.readQuery({ query: CustomerTokenDocument })
61
+ const query = context.cache?.readQuery({ query: CustomerTokenDocument })
49
62
 
50
63
  if (query?.customerToken?.token) {
51
64
  context.headers.authorization = `Bearer ${query?.customerToken?.token}`
@@ -73,7 +86,7 @@ const customerErrorLink = (router: PushRouter) =>
73
86
  /** If the error we're dealing with is not an authorization error, we're done. */
74
87
  if (!authError) return undefined
75
88
 
76
- if (!oldHeaders.authorization) {
89
+ if (!oldHeaders?.authorization) {
77
90
  // console.error(
78
91
  // 'No authorization header found in request, but an authorization error was returned, this is a bug. This is the operation:',
79
92
  // operation,
@@ -0,0 +1,35 @@
1
+ import { ApolloLink, DefaultContext } from '@graphcommerce/graphql'
2
+ import { CustomerTokenDocument } from '../hooks'
3
+
4
+ export const xMagentoCacheIdHeader = new ApolloLink((operation, forward) => {
5
+ operation.setContext((context: DefaultContext) => {
6
+ const xMagentoCacheId = context.cache?.readQuery({ query: CustomerTokenDocument })
7
+ ?.customerToken?.xMagentoCacheId
8
+ if (!xMagentoCacheId) return context
9
+
10
+ return { ...context, headers: { ...context.headers, 'x-magento-cache-id': xMagentoCacheId } }
11
+ })
12
+
13
+ return forward(operation).map((data) => {
14
+ const cache = operation.getContext().cache
15
+ if (!cache) return data
16
+
17
+ const xMagentoCacheId = (data.extensions as { forwardedHeaders: Record<string, string> })
18
+ .forwardedHeaders['x-magento-cache-id']
19
+ if (!xMagentoCacheId) return data
20
+
21
+ const tokenResult = cache.readQuery({ query: CustomerTokenDocument })
22
+
23
+ if (
24
+ !tokenResult?.customerToken ||
25
+ tokenResult.customerToken?.xMagentoCacheId === xMagentoCacheId
26
+ )
27
+ return data
28
+
29
+ cache.writeQuery({
30
+ query: CustomerTokenDocument,
31
+ data: { customerToken: { ...tokenResult.customerToken, xMagentoCacheId } },
32
+ })
33
+ return data
34
+ })
35
+ })
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-customer",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.56",
5
+ "version": "9.0.0-canary.58",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,19 +12,19 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.0.0-canary.56",
16
- "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.56",
17
- "@graphcommerce/framer-next-pages": "^9.0.0-canary.56",
18
- "@graphcommerce/framer-utils": "^9.0.0-canary.56",
19
- "@graphcommerce/graphql": "^9.0.0-canary.56",
20
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.56",
21
- "@graphcommerce/image": "^9.0.0-canary.56",
22
- "@graphcommerce/magento-graphql": "^9.0.0-canary.56",
23
- "@graphcommerce/magento-store": "^9.0.0-canary.56",
24
- "@graphcommerce/next-ui": "^9.0.0-canary.56",
25
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.56",
26
- "@graphcommerce/react-hook-form": "^9.0.0-canary.56",
27
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.56",
15
+ "@graphcommerce/ecommerce-ui": "^9.0.0-canary.58",
16
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.58",
17
+ "@graphcommerce/framer-next-pages": "^9.0.0-canary.58",
18
+ "@graphcommerce/framer-utils": "^9.0.0-canary.58",
19
+ "@graphcommerce/graphql": "^9.0.0-canary.58",
20
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.58",
21
+ "@graphcommerce/image": "^9.0.0-canary.58",
22
+ "@graphcommerce/magento-graphql": "^9.0.0-canary.58",
23
+ "@graphcommerce/magento-store": "^9.0.0-canary.58",
24
+ "@graphcommerce/next-ui": "^9.0.0-canary.58",
25
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.58",
26
+ "@graphcommerce/react-hook-form": "^9.0.0-canary.58",
27
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.58",
28
28
  "@lingui/core": "^4.2.1",
29
29
  "@lingui/macro": "^4.2.1",
30
30
  "@lingui/react": "^4.2.1",
@@ -0,0 +1,14 @@
1
+ import { PluginConfig, PluginProps } from '@graphcommerce/next-config'
2
+ import { xMagentoCacheIdHeader } from '../link/xMagentoCacheIdHeader'
3
+ import { GraphQLProviderProps } from '@graphcommerce/graphql'
4
+
5
+ export const config: PluginConfig = {
6
+ type: 'component',
7
+ module: '@graphcommerce/graphql',
8
+ ifConfig: ['customerXMagentoCacheIdDisable', false],
9
+ }
10
+
11
+ export function GraphQLProvider(props: PluginProps<GraphQLProviderProps>) {
12
+ const { Prev, links = [], ...rest } = props
13
+ return <Prev {...rest} links={[...links, xMagentoCacheIdHeader]} />
14
+ }
@@ -5,4 +5,5 @@ extend type Query {
5
5
  extend type CustomerToken {
6
6
  createdAt: String @deprecated(reason: "Value is not used in GraphCommerce, but still filled in.")
7
7
  valid: Boolean
8
+ xMagentoCacheId: String
8
9
  }
package/typePolicies.ts CHANGED
@@ -16,6 +16,7 @@ const generateCustomerToken: FieldPolicy<Mutation['generateCustomerToken']> = {
16
16
  token: options.readField('token', incoming) as string,
17
17
  createdAt: new Date().toUTCString(),
18
18
  valid: true,
19
+ xMagentoCacheId: null,
19
20
  },
20
21
  },
21
22
  })