@graphcommerce/magento-category 10.0.0-canary.68 → 10.0.0-canary.72
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,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.0.0-canary.72
|
|
4
|
+
|
|
5
|
+
## 10.0.0-canary.71
|
|
6
|
+
|
|
7
|
+
## 10.0.0-canary.70
|
|
8
|
+
|
|
9
|
+
### Major Changes
|
|
10
|
+
|
|
11
|
+
- [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
|
|
12
|
+
|
|
13
|
+
## 10.0.0-canary.69
|
|
14
|
+
|
|
3
15
|
## 10.0.0-canary.68
|
|
4
16
|
|
|
5
17
|
## 10.0.0-canary.67
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-category",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "10.0.0-canary.
|
|
5
|
+
"version": "10.0.0-canary.72",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
"./components/CategoryBreadcrumb/categoryToBreadcrumbs": "./components/CategoryBreadcrumb/categoryToBreadcrumbs.ts"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@graphcommerce/eslint-config-pwa": "^10.0.0-canary.
|
|
21
|
-
"@graphcommerce/framer-scroller": "^10.0.0-canary.
|
|
22
|
-
"@graphcommerce/graphql": "^10.0.0-canary.
|
|
23
|
-
"@graphcommerce/image": "^10.0.0-canary.
|
|
24
|
-
"@graphcommerce/magento-product": "^10.0.0-canary.
|
|
25
|
-
"@graphcommerce/magento-store": "^10.0.0-canary.
|
|
26
|
-
"@graphcommerce/next-ui": "^10.0.0-canary.
|
|
27
|
-
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.
|
|
28
|
-
"@graphcommerce/typescript-config-pwa": "^10.0.0-canary.
|
|
20
|
+
"@graphcommerce/eslint-config-pwa": "^10.0.0-canary.72",
|
|
21
|
+
"@graphcommerce/framer-scroller": "^10.0.0-canary.72",
|
|
22
|
+
"@graphcommerce/graphql": "^10.0.0-canary.72",
|
|
23
|
+
"@graphcommerce/image": "^10.0.0-canary.72",
|
|
24
|
+
"@graphcommerce/magento-product": "^10.0.0-canary.72",
|
|
25
|
+
"@graphcommerce/magento-store": "^10.0.0-canary.72",
|
|
26
|
+
"@graphcommerce/next-ui": "^10.0.0-canary.72",
|
|
27
|
+
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.72",
|
|
28
|
+
"@graphcommerce/typescript-config-pwa": "^10.0.0-canary.72",
|
|
29
29
|
"@lingui/core": "^5",
|
|
30
30
|
"@lingui/macro": "^5",
|
|
31
31
|
"@lingui/react": "^5",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApolloClient
|
|
1
|
+
import type { ApolloClient } from '@graphcommerce/graphql'
|
|
2
2
|
import { limitSsg } from '@graphcommerce/next-config/config'
|
|
3
3
|
import type { GetStaticPathsResult } from 'next'
|
|
4
4
|
import type { GetCategoryStaticPathsQuery } from './GetCategoryStaticPaths.gql'
|
|
@@ -7,11 +7,11 @@ import { GetCategoryStaticPathsDocument } from './GetCategoryStaticPaths.gql'
|
|
|
7
7
|
type StaticPathsResult = GetStaticPathsResult<{ url: string[] }>
|
|
8
8
|
|
|
9
9
|
const getCategoryStaticPaths = async (
|
|
10
|
-
client: ApolloClient
|
|
10
|
+
client: ApolloClient,
|
|
11
11
|
locale: string,
|
|
12
12
|
options: { limit?: boolean } = { limit: limitSsg || false },
|
|
13
13
|
) => {
|
|
14
|
-
const
|
|
14
|
+
const result = await client.query({
|
|
15
15
|
query: GetCategoryStaticPathsDocument,
|
|
16
16
|
})
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ const getCategoryStaticPaths = async (
|
|
|
22
22
|
if (cat?.url_path) paths.push({ params: { url: cat.url_path.split('/') }, locale })
|
|
23
23
|
if (cat?.children) cat.children.forEach(add)
|
|
24
24
|
}
|
|
25
|
-
data
|
|
25
|
+
result.data?.categories?.items?.forEach(add)
|
|
26
26
|
|
|
27
27
|
return options.limit ? paths.slice(0, 1) : paths
|
|
28
28
|
}
|
|
@@ -8,7 +8,7 @@ export function appendSiblingsAsChildren(
|
|
|
8
8
|
categoryPromise: Promise<
|
|
9
9
|
(CategoryBreadcrumbFragment & CategoryChildrenFragment) | null | undefined
|
|
10
10
|
>,
|
|
11
|
-
client: ApolloClient
|
|
11
|
+
client: ApolloClient,
|
|
12
12
|
) {
|
|
13
13
|
return categoryPromise.then(async (cat) => {
|
|
14
14
|
const parentUid = findParentBreadcrumbItem(cat)?.category_uid
|
|
@@ -18,6 +18,6 @@ export function appendSiblingsAsChildren(
|
|
|
18
18
|
query: CategorySiblingsDocument,
|
|
19
19
|
variables: { parentUid },
|
|
20
20
|
})
|
|
21
|
-
cat.children = res.data
|
|
21
|
+
cat.children = res.data?.categories?.items
|
|
22
22
|
})
|
|
23
23
|
}
|