@graphcommerce/docs 6.2.0-canary.9 → 6.2.0-canary.90

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,195 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.90
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2034](https://github.com/graphcommerce-org/graphcommerce/pull/2034) [`6fca47484`](https://github.com/graphcommerce-org/graphcommerce/commit/6fca474847fe52f004a6ac0abbd88492512b46ad) - Pre-resolve the customFetch in mesh config ([@paales](https://github.com/paales))
8
+
9
+ ## 6.2.0-canary.89
10
+
11
+ ## 6.2.0-canary.88
12
+
13
+ ## 6.2.0-canary.87
14
+
15
+ ### Patch Changes
16
+
17
+ - [#2022](https://github.com/graphcommerce-org/graphcommerce/pull/2022) [`0495db84d`](https://github.com/graphcommerce-org/graphcommerce/commit/0495db84d1d450750bd74b94a379b4e7764a5753) - add documentation for the GraphCommerceStorefrontConfig gallery option. ([@carlocarels90](https://github.com/carlocarels90))
18
+
19
+ ## 6.2.0-canary.86
20
+
21
+ ## 6.2.0-canary.85
22
+
23
+ ## 6.2.0-canary.84
24
+
25
+ ## 6.2.0-canary.83
26
+
27
+ ## 6.2.0-canary.82
28
+
29
+ ## 6.2.0-canary.81
30
+
31
+ ## 6.2.0-canary.80
32
+
33
+ ## 6.2.0-canary.79
34
+
35
+ ## 6.2.0-canary.78
36
+
37
+ ## 6.2.0-canary.77
38
+
39
+ ## 6.2.0-canary.76
40
+
41
+ ## 6.2.0-canary.75
42
+
43
+ ## 6.2.0-canary.74
44
+
45
+ ## 6.2.0-canary.73
46
+
47
+ ### Patch Changes
48
+
49
+ - [#1978](https://github.com/graphcommerce-org/graphcommerce/pull/1978) [`0c91ac1f7`](https://github.com/graphcommerce-org/graphcommerce/commit/0c91ac1f70f58dec418e945fc4a6a8c6732cc21e) - When a user selects a variant, it will switch the values on the configurable page with the values of the configured variant. Enabling options here will allow switching of those variants. ([@carlocarels90](https://github.com/carlocarels90))
50
+
51
+ ## 6.2.0-canary.72
52
+
53
+ ## 6.2.0-canary.71
54
+
55
+ ## 6.2.0-canary.70
56
+
57
+ ## 6.2.0-canary.69
58
+
59
+ ## 6.2.0-canary.68
60
+
61
+ ## 6.2.0-canary.67
62
+
63
+ ## 6.2.0-canary.66
64
+
65
+ ## 6.2.0-canary.65
66
+
67
+ ## 6.2.0-canary.64
68
+
69
+ ## 6.2.0-canary.63
70
+
71
+ ## 6.2.0-canary.62
72
+
73
+ ## 6.2.0-canary.61
74
+
75
+ ## 6.2.0-canary.60
76
+
77
+ ## 6.2.0-canary.59
78
+
79
+ ## 6.2.0-canary.58
80
+
81
+ ## 6.2.0-canary.57
82
+
83
+ ## 6.2.0-canary.56
84
+
85
+ ## 6.2.0-canary.55
86
+
87
+ ## 6.2.0-canary.54
88
+
89
+ ## 6.2.0-canary.53
90
+
91
+ ## 6.2.0-canary.52
92
+
93
+ ## 6.2.0-canary.51
94
+
95
+ ### Patch Changes
96
+
97
+ - [`2f479c830`](https://github.com/graphcommerce-org/graphcommerce/commit/2f479c830e84137b739d83bc6dd1e36a6e299e3a) - Added advise about URL suffixes ([@paales](https://github.com/paales))
98
+
99
+ ## 6.2.0-canary.50
100
+
101
+ ## 6.2.0-canary.49
102
+
103
+ ### Patch Changes
104
+
105
+ - [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`d0809b132`](https://github.com/graphcommerce-org/graphcommerce/commit/d0809b132a0e4cbdfeb86164f6c16a89ebecd987) - Added support for default values in the Config.graphqls files for the documentation ([@JoshuaS98](https://github.com/JoshuaS98))
106
+
107
+ ## 6.2.0-canary.48
108
+
109
+ ## 6.2.0-canary.47
110
+
111
+ ## 6.2.0-canary.46
112
+
113
+ ## 6.2.0-canary.45
114
+
115
+ ## 6.2.0-canary.44
116
+
117
+ ## 6.2.0-canary.43
118
+
119
+ ## 6.2.0-canary.42
120
+
121
+ ## 6.2.0-canary.41
122
+
123
+ ## 6.2.0-canary.40
124
+
125
+ ## 6.2.0-canary.39
126
+
127
+ ### Patch Changes
128
+
129
+ - [#1957](https://github.com/graphcommerce-org/graphcommerce/pull/1957) [`cb3c82163`](https://github.com/graphcommerce-org/graphcommerce/commit/cb3c82163c32768f977b85c21b029ead354847af) - Docs were directly applied to the config.md which is autogenerated ([@paales](https://github.com/paales))
130
+
131
+ ## 6.2.0-canary.38
132
+
133
+ ## 6.2.0-canary.37
134
+
135
+ ## 6.2.0-canary.36
136
+
137
+ ## 6.2.0-canary.35
138
+
139
+ ## 6.2.0-canary.34
140
+
141
+ ## 6.2.0-canary.33
142
+
143
+ ## 6.2.0-canary.32
144
+
145
+ ## 6.2.0-canary.31
146
+
147
+ ## 6.2.0-canary.30
148
+
149
+ ## 6.2.0-canary.29
150
+
151
+ ## 6.2.0-canary.28
152
+
153
+ ## 6.2.0-canary.27
154
+
155
+ ## 6.2.0-canary.26
156
+
157
+ ## 6.2.0-canary.25
158
+
159
+ ## 6.2.0-canary.24
160
+
161
+ ## 6.2.0-canary.23
162
+
163
+ ## 6.2.0-canary.22
164
+
165
+ ## 6.2.0-canary.21
166
+
167
+ ## 6.2.0-canary.20
168
+
169
+ ## 6.2.0-canary.19
170
+
171
+ ## 6.2.0-canary.18
172
+
173
+ ### Patch Changes
174
+
175
+ - [#1933](https://github.com/graphcommerce-org/graphcommerce/pull/1933) [`e644887a7`](https://github.com/graphcommerce-org/graphcommerce/commit/e644887a75a3801a8b0dcf39558f56110a51d774) - Updated ReCAPTCHA docs ([@bramvanderholst](https://github.com/bramvanderholst))
176
+
177
+ ## 6.2.0-canary.17
178
+
179
+ ## 6.2.0-canary.16
180
+
181
+ ## 6.2.0-canary.15
182
+
183
+ ## 6.2.0-canary.14
184
+
185
+ ## 6.2.0-canary.13
186
+
187
+ ## 6.2.0-canary.12
188
+
189
+ ## 6.2.0-canary.11
190
+
191
+ ## 6.2.0-canary.10
192
+
3
193
  ## 6.2.0-canary.9
4
194
 
5
195
  ## 6.2.0-canary.8
@@ -115,10 +115,29 @@ When Magento's StoreConfig adds this value, this can be replaced.
115
115
 
116
116
  Use compare functionality
117
117
 
118
- #### `compareVariant: [CompareVariant](#CompareVariant)`
118
+ #### `compareVariant: [CompareVariant](#CompareVariant) (default: ICON)`
119
119
 
120
- By default the compare feature is denoted with a 'compare icon' (2 arrows facing one another).
121
- 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
120
+ By default the compare feature is denoted with a 'compare ICON' (2 arrows facing one another).
121
+ 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
122
+
123
+ #### `configurableVariantForSimple: Boolean (default: [object Object])`
124
+
125
+ If a simple product is part of a Configurable product page, should the simple product be
126
+ rendered as a configured option of the configurable product page?
127
+
128
+ How does this work:
129
+
130
+ When the `products(filters: { url_key: { eq: 'simple-product' } }) { ... }` query is ran,
131
+ Magento also returns the Simple product and the Configurable product the simple belongs to.
132
+
133
+ If that is the case we render the configurable product page instead of the simple product page but
134
+ the options to select the simple product are pre-selected.
135
+
136
+ #### `configurableVariantValues: [MagentoConfigurableVariantValues](#MagentoConfigurableVariantValues) (default: [object Object])`
137
+
138
+ When a user selects a variant, it will switch the values on the configurable page with the values of the configured variant.
139
+
140
+ Enabling options here will allow switching of those variants.
122
141
 
123
142
  #### `customerRequireEmailConfirmation: Boolean`
124
143
 
@@ -132,7 +151,7 @@ This value should match Magento 2's configuration value for
132
151
 
133
152
  Debug configuration for GraphCommerce
134
153
 
135
- #### `demoMode: Boolean`
154
+ #### `demoMode: Boolean (default: true)`
136
155
 
137
156
  Enables some demo specific code that is probably not useful for a project:
138
157
 
@@ -150,9 +169,13 @@ To override the value for a specific locale, configure in i18n config.
150
169
 
151
170
  #### `googleRecaptchaKey: String`
152
171
 
153
- Google reCAPTCHA key, get from https://developers.google.com/recaptcha/docs/v3
172
+ Google reCAPTCHA site key.
173
+ When using reCAPTCHA, this value is required, even if you are configuring different values for each locale.
154
174
 
155
- This value is required even if you are configuring different values for each locale.
175
+ Get a site key and a secret key from https://developers.google.com/recaptcha/docs/v3
176
+
177
+ The secret key should be added in the Magento admin panel (Stores > Configuration > Security > Google ReCAPTCHA Storefront > reCAPTCHA v3 Invisible)
178
+ ReCAPTCHA can then be enabled/disabled for the different forms, separately (Stores > Configuration > Security > Google ReCAPTCHA Storefront > Storefront)
156
179
 
157
180
  #### `googleTagmanagerId: String`
158
181
 
@@ -160,6 +183,10 @@ The Google Tagmanager ID to be used on the site.
160
183
 
161
184
  This value is required even if you are configuring different values for each locale.
162
185
 
186
+ #### `hygraphProjectId: String`
187
+
188
+ Hygraph Project ID. **Only used for migrations.**
189
+
163
190
  #### `hygraphWriteAccessEndpoint: String`
164
191
 
165
192
  Content API. **Only used for migrations.**
@@ -187,6 +214,12 @@ Project settings -> API Access -> Permanent Auth Tokens
187
214
  - Delete existing components
188
215
  - Update remote sources
189
216
  - Delete remote sources
217
+ - Read existing environments
218
+ - Read public content views
219
+ - Create public content views
220
+ - Update public content views
221
+ - Delete public content views
222
+ - Can see schema view
190
223
 
191
224
  ```
192
225
  GC_HYGRAPH_WRITE_ACCESS_ENDPOINT="https://...hygraph.com/v2/..."
@@ -210,6 +243,12 @@ Limit the static generation of SSG when building
210
243
 
211
244
  To enable next.js' preview mode, configure the secret you'd like to use.
212
245
 
246
+ #### `productFiltersLayout: [ProductFiltersLayout](#ProductFiltersLayout) (default: DEFAULT)`
247
+
248
+ Layout how the filters are rendered.
249
+ DEFAULT: Will be rendered as horzontal chips on desktop and mobile
250
+ SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile
251
+
213
252
  #### `productFiltersPro: Boolean`
214
253
 
215
254
  Product filters with better UI for mobile and desktop.
@@ -325,4 +364,23 @@ Add a gcms-locales header to make sure queries return in a certain language, can
325
364
 
326
365
  #### `linguiLocale: String`
327
366
 
328
- Specify a custom locale for to load translations.
367
+ Specify a custom locale for to load translations.
368
+
369
+ ### MagentoConfigurableVariantValues
370
+
371
+ Options to configure which values will be replaced when a variant is selected on the product page.
372
+
373
+ #### `content: Boolean`
374
+
375
+ Use the name, description, short description and meta data from the configured variant
376
+
377
+ #### `gallery: Boolean`
378
+
379
+ This option enables the automatic update of product gallery images on the product page when a variant is selected,
380
+ provided that the gallery images for the selected variant differ from the currently displayed images.
381
+
382
+ #### `url: Boolean`
383
+
384
+ When a variant is selected the URL of the product will be changed in the address bar.
385
+
386
+ This only happens when the actual variant is can be accessed by the URL.
@@ -35,6 +35,20 @@ to simplify the process of making correct favicons.
35
35
  <figcaption>Favicon sketch template</figcaption>
36
36
  </figure>
37
37
 
38
+ ## Open Graph preview image
39
+
40
+ The Open Graph image is automaticly set for product and category pages if
41
+ possible. For product pages the first gallary image will be used and for
42
+ category pages the image uploaded to the `Category Image` attribute. If these
43
+ images are not availale or on any of the other other pages a preview image will
44
+ not be added unless added as `ogImage` prop to the `PageMeta`, `, CategoryMeta`
45
+ or `ProductPageMeta` components.
46
+
47
+ It is possible to enable a fallback image per route by setting the
48
+ `ogImageUseFallback` prop to `true` on either the `PageMeta`, `, CategoryMeta`
49
+ or `ProductPageMeta` components. The image used as fallback can be found at
50
+ `/public/open-graph-image.jpg`
51
+
38
52
  ## Next steps
39
53
 
40
54
  - Lear more about [Static file serving](../framework/static-file-serving.md)
package/hygraph/cli.md ADDED
@@ -0,0 +1,63 @@
1
+ ---
2
+ menu: Hygraph cli
3
+ ---
4
+
5
+ # Hygraph migrate cli
6
+
7
+ It is possible to upgrade your Hygraph schema using the Graphcommerce Hygraph
8
+ CLI: `yarn graphcommerce hygraph-migrate`
9
+
10
+ This is a tool that automatically modifies your Hygraph schema without having to
11
+ add models, components field and enumerations manually.
12
+
13
+ Please note that:
14
+
15
+ - All migrations are backwards compatible with previous versions of
16
+ GraphCommerce. This means that after running a migration, older versions of
17
+ GraphCommerce will still work (unless specified otherwise)
18
+
19
+ - There is no rollback functionality in the Hygraph migrate cli. Please create a
20
+ copy of the project to test te migration on first. Once you run a migration,
21
+ you can't undo these schema changes with the CLI. You will be required
22
+ rollback the from the UI yourself.
23
+
24
+ ### Steps
25
+
26
+ The following steps are needed to utilize this tool:
27
+
28
+ 1. Create a Hygraph migration token
29
+ 1. Open your Hygraph project. Go to: Project settings > Permanent auth tokens
30
+ 2. Click 'Add token' and give it a name, something like 'GraphCommerce Write
31
+ Access Token' and keep stage on 'Published'.
32
+ 3. Under 'Management API', click 'Yes, Initialize defaults'
33
+ 4. Click 'Edit Permissions' and enable: 'Update' and 'Delete' permissions for
34
+ 'models', 'enumerations', 'fields', 'components' and 'sources':
35
+ - Update existing models
36
+ - Delete existing models
37
+ - Update existing fields
38
+ - Delete existing fields
39
+ - Update existing enumerations
40
+ - Delete existing enumerations
41
+ - Update existing components
42
+ - Delete existing components
43
+ - Update remote sources
44
+ - Delete remote sources
45
+ - Read existing environments
46
+ - Read public content views
47
+ - Create public content views
48
+ - Update public content views
49
+ - Delete public content views
50
+ - Can see schema view
51
+ 5. Add this new token to your env file: `GC_HYGRAPH_WRITE_ACCESS_TOKEN=""`
52
+ 2. Add the Content API key to your env file like this:
53
+ 1. Open your Hygraph project. Go to: Project settings -> API Access
54
+ 2. Copy the Content API URL and add to your env file:
55
+ `GC_HYGRAPH_WRITE_ACCESS_ENDPOINT=""`
56
+ 3. Add your hygraphProjectId to your env file like this:
57
+ 1. Copy the project ID from the URL when logged in
58
+ `https://app.hygraph.com/PROJECT_ID_IS_HERE/master`
59
+ 2. Add the project ID to your env file: `GC_HYGRAPH_PROJECT_ID=””`
60
+ 4. Run `yarn graphcommerce hygraph-migrate`
61
+ 5. Select the migration you want to run and press enter.
62
+ 6. The migrations should now be applied, check your Hygraph Schema if changes
63
+ are made.
@@ -1,5 +1,5 @@
1
1
  ---
2
- menu: Hygraph
2
+ menu: Overview
3
3
  ---
4
4
 
5
5
  # Hygraph
@@ -66,3 +66,4 @@ Is used to add a`RowProduct (variant:Grid)` and a
66
66
 
67
67
  - Learn how to
68
68
  [build a custom Hygraph component](../getting-started/graphcms-component.md)
69
+ - Learn how to [upgrade your Hygraph schema](./upgrading.md)
@@ -0,0 +1,95 @@
1
+ ---
2
+ menu: Configurable Products
3
+ ---
4
+
5
+ # Configurable Products
6
+
7
+ Example:
8
+ [Simple product (with pre-selection)](https://graphcommerce.vercel.app/p/matriarch-s-edges-size-4-6y-gc-469-sock-6y)
9
+
10
+ GraphCommerce enables various ways to manage the display of data from
11
+ configurable products in Magento. This flexibility allows you to choose dynamic
12
+ updates for the following data:
13
+
14
+ - **Content:** Name, description, short description, and meta-data from the
15
+ selected variant.
16
+ - **Gallery:** Automatically updates product gallery images on the product page
17
+ when a variant is chosen, provided the gallery images for the selected variant
18
+ differ from the currently displayed ones.
19
+ - **URL:** The product URL changes in the address bar when a variant is
20
+ selected, but this only happens when the actual variant can be accessed via
21
+ the URL.
22
+
23
+ ## Enabling this Feature
24
+
25
+ To enable this feature, add the **configurableVariantValues** section to your
26
+ `graphcommerce.config.js` file and activate the desired options.
27
+
28
+ ```
29
+ const config = {
30
+ ...
31
+
32
+ configurableVariantValues: {
33
+ url: true,
34
+ gallery: true,
35
+ content: true,
36
+ },
37
+
38
+ configurableVariantForSimple: true,
39
+ }
40
+ ```
41
+
42
+ ### GraphCommerceConfig
43
+
44
+ - #### `configurableVariantForSimple: Boolean`
45
+
46
+ Determines whether a simple product should appear as a Configurable Product
47
+ with pre-selected options or as the default Simple Product.
48
+
49
+ **How does this work:**
50
+
51
+ When the `products(filters: { url_key: { eq: 'simple-product' } }) { ... }`
52
+ query is ran, Magento also returns the Simple product and the Configurable
53
+ product the simple belongs to.
54
+
55
+ If that is the case we render the Configurable Product page instead of the
56
+ Simple Product page but the options to select the Simple Product are
57
+ pre-selected.
58
+
59
+ - #### `configurableVariantValues`
60
+
61
+ Options to configure which values will be replaced when a variant is selected
62
+ on the product page.
63
+
64
+ - #### `content: Boolean`
65
+
66
+ **Description:** Use the name, description, short description and meta data
67
+ from the configured variant
68
+
69
+ - #### `gallery: Boolean`
70
+
71
+ **Description:** This option enables the automatic update of product gallery
72
+ images on the product page when a variant is selected, provided that the
73
+ gallery images for the selected variant differ from the currently displayed
74
+ images.
75
+
76
+ - #### `url: Boolean`
77
+
78
+ **Description:** When a variant is selected the URL of the product will be
79
+ changed in the address bar.
80
+
81
+ **Note:** This only occurs when the actual variant can be accessed through
82
+ the URL.
83
+
84
+ ## Magento configuration
85
+
86
+ ### How should a Magento administrator configure the configurable and simple products to use this?
87
+
88
+ To make use of this features the Visibility of your product should be set to
89
+ **Catalog** or **Catalog, Search**. Or else the data is not accessible.
90
+
91
+ > `Catalog -> Products -> [product] -> Visibility: [Catalog / Catalog, Search]`
92
+
93
+ ## Next steps
94
+
95
+ - [Overview](./readme)
package/magento/readme.md CHANGED
@@ -50,6 +50,20 @@ For Magento Open Source:
50
50
  For Adobe Commerce:
51
51
  `Stores -> Attributes -> Customer Address -> street -> Lines Count`
52
52
 
53
+ ### Remove URL suffixes from products and categorories (optional)
54
+
55
+ GraphCommerce does not support URL suffixes, because Next.js can not handle urls
56
+ ending in `.html`. When migrating from an existing shop, GraphCommerce will
57
+ automatically redirect to the suffix-less URL. However, GraphCommerce will need
58
+ to do an additional query to Magento to find the route.
59
+
60
+ If you are starting out from a new project, we recommend to remove the URL
61
+ suffixes from products and categories.
62
+
63
+ Remove the URL suffixes from products and categories. (default is `.html`)
64
+ `Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> Product URL Suffix`
65
+ `Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> Category URL Suffix`
66
+
53
67
  ## Optional packages
54
68
 
55
69
  - [Store Pickup / MSI](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-pickup)
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@graphcommerce/docs",
3
3
  "homepage": "https://www.graphcommerce.org/docs",
4
4
  "repository": "github:graphcommerce-org/graphcommerce/docs",
5
- "version": "6.2.0-canary.9",
5
+ "version": "6.2.0-canary.90",
6
6
  "sideEffects": true,
7
7
  "devDependencies": {
8
- "@graphcommerce/prettier-config-pwa": "6.2.0-canary.9"
8
+ "@graphcommerce/prettier-config-pwa": "6.2.0-canary.90"
9
9
  },
10
10
  "prettier": "@graphcommerce/prettier-config-pwa"
11
11
  }
package/roadmap.md CHANGED
@@ -15,9 +15,8 @@ The following overview contains the status of items on the GraphCommerce roadmap
15
15
 
16
16
  ## In progress
17
17
 
18
- - [ ] Algolia implementation
19
- - [ ] Dynamic Row based content
20
- - [ ] Product compare functionality
18
+ - [ ] Better authorization handling
19
+ - [ ] Hygraph schema migrations
21
20
  - [ ] Edge runtime for GraphQL Mesh and Streaming SSR rendering
22
21
  - [ ] Global store messages
23
22
 
@@ -25,6 +24,9 @@ The following overview contains the status of items on the GraphCommerce roadmap
25
24
 
26
25
  [See all releases](https://github.com/graphcommerce-org/graphcommerce/releases?q=prerelease%3Afalse+&expanded=true)
27
26
 
27
+ - [x] [Algolia Search (beta)](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-search)
28
+ - [x] [Dynamic Rows (beta)](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-dynamic-rows)
29
+ - [x] [Product compare](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-compare/Config.graphqls)
28
30
  - [x] Google Tagmanager 4 datalayer implementation
29
31
  [docs ↗](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/googleanalytics)
30
32
  - [x] Paypal Express payment service
@@ -0,0 +1,96 @@
1
+ # Upgrading from GraphCommerce 6 to 7
2
+
3
+ Depending on the amounts of customisations you've made, there are some manual
4
+ steps. Please follow the regular [upgrade steps first](./readme.md).
5
+
6
+ 1. [Add `fetchPolicy: cache-first` to LayoutDocument](#add-cache-first-fetchpolicy-to-layoutdocument)
7
+ 2. [Use thew new `hygraphPageContent` function instead of DefaultPageQuery](#use-the-new-hygraphpagecontent-function-instead-of-defaultpagequery)
8
+ 3. [Translation file updates](#translation-file-updates)
9
+ 4. [All @graphql-mesh/\* should be set to latest](#all-graphql-mesh-should-be-set-to-latest)
10
+ 5. [Upgrading your Hygraph schema](#upgrading-your-hygraph-schema)
11
+
12
+ ## Add `fetchPolicy: cache-first` to LayoutDocument queries
13
+
14
+ 🟠 Only required if you've added custom pages
15
+
16
+ All occurences of LayoutDocument should get a `fetchPolicy: 'cache-first'`
17
+ option.
18
+
19
+ ```tsx
20
+ // Find all occurences of
21
+ staticClient.query({ query: LayoutDocument })
22
+
23
+ // Replace with
24
+ staticClient.query({ query: LayoutDocument, fetchPolicy: 'cache-first' })
25
+ ```
26
+
27
+ ## Use the new `hygraphPageContent` function instead of DefaultPageQuery
28
+
29
+ 🟠 Only required if you've added custom pages
30
+
31
+ The `DefaultPageDocument` is removed in favor of the new `hygraphPageContent`
32
+ query. This function handles caching better and allows for (currently in beta)
33
+ DynamicRows feature.
34
+
35
+ ```tsx
36
+ // DefaultPageDocument
37
+ const page = staticClient.query({
38
+ query: DefaultPageDocument,
39
+ variables: { url: `blog/${urlKey}` },
40
+ })
41
+
42
+ // Becomes hygraphPageContent
43
+ const page = hygraphPageContent(staticClient, `blog/${urlKey}`)
44
+ ```
45
+
46
+ ## Translation file updates
47
+
48
+ 🟠 Only required if you've added custom translations
49
+
50
+ All locales files now require a `msgid` comment. All translations need to have a
51
+ `#. js-lingui-explicit-id` comment added. This could be done with a
52
+ find-and-replace:
53
+
54
+ Find (including the empty line)
55
+
56
+ ```
57
+
58
+ msgid
59
+ ```
60
+
61
+ Replace with (including the empty line)
62
+
63
+ ```
64
+
65
+ #. js-lingui-explicit-id
66
+ msgid
67
+ ```
68
+
69
+ To validate your translations run `yarn lingui` to extract everything.
70
+
71
+ ## All @graphql-mesh/\* should be set to latest.
72
+
73
+ 🟠 Only required if you've added custom @graphql-mesh/\* packages
74
+
75
+ All @graphql-mesh packages are using a 0.x.x versioning schema. This means that
76
+ each minor change is considered a major change by yarn. This causes lots of
77
+ issues with version mismatches. Since `@graphql-mesh` isn't making any major
78
+ breaking before releasing 1.x this is the safest course of action for now. Once
79
+ 1.x is released we'll switch to "^1.0.0" as a version constraint.
80
+
81
+ In your package.json
82
+
83
+ ```json
84
+ // Replace
85
+ "@graphql-mesh/json-schema": "^0.37.6",
86
+ "@graphql-mesh/transform-filter-schema": "^0.15.8",
87
+
88
+ // With
89
+ "@graphql-mesh/json-schema": "latest",
90
+ "@graphql-mesh/transform-filter-schema": "latest",
91
+ ```
92
+
93
+ ## Upgrading your Hygraph schema
94
+
95
+ Upgrade your Hygraph schema with the [Hygraph migration cli](../hygraph/cli.md).
96
+ Select `graphcommerce6to7` as version.
@@ -107,6 +107,7 @@ find . -type f -name '*.rej' -delete
107
107
  After resolving the diff issues, manually process upgrade instructions:
108
108
 
109
109
  - [Upgrading to GraphCommerce 5 to 6](../upgrading/graphcommerce-5-to-6.md)
110
+ - [Upgrading to GraphCommerce 6 to 7](../upgrading/graphcommerce-6-to-7.md)
110
111
 
111
112
  Run and validate your local environment:
112
113