@graphcommerce/graphcms-ui 6.0.0-canary.43 → 6.0.0-canary.45
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 +8 -0
- package/Config.graphqls +1 -1
- package/links/createHygraphLink.ts +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 6.0.0-canary.45
|
|
4
|
+
|
|
5
|
+
## 6.0.0-canary.44
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#1842](https://github.com/graphcommerce-org/graphcommerce/pull/1842) [`7b67d84bd`](https://github.com/graphcommerce-org/graphcommerce/commit/7b67d84bd269c3fc91afbd69f6683c5d12808d36) - Renamed i18n to storefront in configuration ([@paales](https://github.com/paales))
|
|
10
|
+
|
|
3
11
|
## 6.0.0-canary.43
|
|
4
12
|
|
|
5
13
|
## 6.0.0-canary.42
|
package/Config.graphqls
CHANGED
|
@@ -7,7 +7,7 @@ extend input GraphCommerceConfig {
|
|
|
7
7
|
hygraphEndpoint: String!
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
extend input
|
|
10
|
+
extend input GraphCommerceStorefrontConfig {
|
|
11
11
|
"""
|
|
12
12
|
Add a gcms-locales header to make sure queries return in a certain language, can be an array to define fallbacks.
|
|
13
13
|
"""
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { setContext } from '@graphcommerce/graphql'
|
|
2
|
-
import {
|
|
2
|
+
import { storefrontConfig } from '@graphcommerce/next-ui'
|
|
3
3
|
|
|
4
4
|
/** Add a gcms-locales header to make sure queries return in a certain language. */
|
|
5
5
|
export const createHygraphLink = (locale?: string) =>
|
|
6
6
|
setContext((_, context) => {
|
|
7
7
|
if (!context.headers) context.headers = {}
|
|
8
8
|
|
|
9
|
-
const locales =
|
|
9
|
+
const locales = storefrontConfig(locale)?.hygraphLocales
|
|
10
10
|
if (locales) context.headers['gcms-locales'] = locales.join(',')
|
|
11
11
|
|
|
12
12
|
return context
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/graphcms-ui",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "6.0.0-canary.
|
|
5
|
+
"version": "6.0.0-canary.45",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "6.0.0-canary.
|
|
16
|
-
"@graphcommerce/prettier-config-pwa": "6.0.0-canary.
|
|
17
|
-
"@graphcommerce/typescript-config-pwa": "6.0.0-canary.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "6.0.0-canary.45",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "6.0.0-canary.45",
|
|
17
|
+
"@graphcommerce/typescript-config-pwa": "6.0.0-canary.45"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@graphcommerce/graphql": "6.0.0-canary.
|
|
21
|
-
"@graphcommerce/image": "6.0.0-canary.
|
|
22
|
-
"@graphcommerce/next-ui": "6.0.0-canary.
|
|
20
|
+
"@graphcommerce/graphql": "6.0.0-canary.45",
|
|
21
|
+
"@graphcommerce/image": "6.0.0-canary.45",
|
|
22
|
+
"@graphcommerce/next-ui": "6.0.0-canary.45"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@mui/material": "^5.10.16",
|