@graphcommerce/algolia-recommend 9.0.0-canary.101 → 9.0.0-canary.103
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 +1 -31
- package/mesh/getRecommendationArgs.ts +1 -1
- package/mesh/getRecommendations.ts +1 -1
- package/mesh/resolvers.ts +7 -7
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,34 +1,6 @@
|
|
|
1
1
|
# @graphcommerce/algolia-recommend
|
|
2
2
|
|
|
3
|
-
## 9.0.0-canary.
|
|
4
|
-
|
|
5
|
-
## 9.0.0-canary.100
|
|
6
|
-
|
|
7
|
-
## 9.0.0-canary.99
|
|
8
|
-
|
|
9
|
-
## 9.0.0-canary.98
|
|
10
|
-
|
|
11
|
-
## 9.0.0-canary.97
|
|
12
|
-
|
|
13
|
-
## 9.0.0-canary.96
|
|
14
|
-
|
|
15
|
-
## 9.0.0-canary.95
|
|
16
|
-
|
|
17
|
-
## 9.0.0-canary.94
|
|
18
|
-
|
|
19
|
-
## 9.0.0-canary.93
|
|
20
|
-
|
|
21
|
-
## 9.0.0-canary.92
|
|
22
|
-
|
|
23
|
-
## 9.0.0-canary.91
|
|
24
|
-
|
|
25
|
-
## 9.0.0-canary.90
|
|
26
|
-
|
|
27
|
-
## 9.0.0-canary.89
|
|
28
|
-
|
|
29
|
-
## 9.0.0-canary.88
|
|
30
|
-
|
|
31
|
-
## 9.0.0-canary.87
|
|
3
|
+
## 9.0.0-canary.103
|
|
32
4
|
|
|
33
5
|
## 9.0.0-canary.86
|
|
34
6
|
|
|
@@ -36,8 +8,6 @@
|
|
|
36
8
|
|
|
37
9
|
- [#2379](https://github.com/graphcommerce-org/graphcommerce/pull/2379) [`ce30678`](https://github.com/graphcommerce-org/graphcommerce/commit/ce30678ad353ac4c7c38d79e96a2bb3de55f6fcb) - Automatically fall back to existing upsells/related products if they are defined and Algolia returns an error ([@paales](https://github.com/paales))
|
|
38
10
|
|
|
39
|
-
## 9.0.0-canary.85
|
|
40
|
-
|
|
41
11
|
## 9.0.0-canary.84
|
|
42
12
|
|
|
43
13
|
### Minor Changes
|
package/mesh/resolvers.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type {
|
|
|
10
10
|
ResolversParentTypes,
|
|
11
11
|
ResolversTypes,
|
|
12
12
|
} from '@graphcommerce/graphql-mesh'
|
|
13
|
-
import {
|
|
13
|
+
import type {
|
|
14
14
|
GraphCommerceAlgoliaRecommendationLocation,
|
|
15
15
|
InputMaybe,
|
|
16
16
|
Maybe,
|
|
@@ -106,7 +106,7 @@ if (isEnabled(import.meta.graphCommerce.algolia.relatedProducts)) {
|
|
|
106
106
|
productInterfaceTypes.forEach((productType) => {
|
|
107
107
|
if (!resolvers[productType]) resolvers[productType] = {}
|
|
108
108
|
resolvers[productType][fieldName] = {
|
|
109
|
-
selectionSet:
|
|
109
|
+
selectionSet: '{ uid }',
|
|
110
110
|
resolve,
|
|
111
111
|
}
|
|
112
112
|
})
|
|
@@ -131,7 +131,7 @@ if (isEnabled(import.meta.graphCommerce.algolia.lookingSimilar)) {
|
|
|
131
131
|
productInterfaceTypes.forEach((productType) => {
|
|
132
132
|
if (!resolvers[productType]) resolvers[productType] = {}
|
|
133
133
|
resolvers[productType][fieldName] = {
|
|
134
|
-
selectionSet:
|
|
134
|
+
selectionSet: '{ uid }',
|
|
135
135
|
resolve,
|
|
136
136
|
}
|
|
137
137
|
})
|
|
@@ -156,7 +156,7 @@ if (isEnabled(import.meta.graphCommerce.algolia.frequentlyBoughtTogether)) {
|
|
|
156
156
|
|
|
157
157
|
productInterfaceTypes.forEach((productType) => {
|
|
158
158
|
if (!resolvers[productType]) resolvers[productType] = {}
|
|
159
|
-
resolvers[productType][fieldName] = { selectionSet:
|
|
159
|
+
resolvers[productType][fieldName] = { selectionSet: '{ uid }', resolve }
|
|
160
160
|
})
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -230,12 +230,12 @@ const together: ResolverFn<
|
|
|
230
230
|
productInterfaceTypes.forEach((productType) => {
|
|
231
231
|
if (!resolvers[productType]) resolvers[productType] = {}
|
|
232
232
|
|
|
233
|
-
resolvers[productType].algolia_looking_similar = { selectionSet:
|
|
233
|
+
resolvers[productType].algolia_looking_similar = { selectionSet: '{ uid }', resolve: similar }
|
|
234
234
|
|
|
235
|
-
resolvers[productType].algolia_related_products = { selectionSet:
|
|
235
|
+
resolvers[productType].algolia_related_products = { selectionSet: '{ uid }', resolve: related }
|
|
236
236
|
|
|
237
237
|
resolvers[productType].algolia_frequently_bought_together = {
|
|
238
|
-
selectionSet:
|
|
238
|
+
selectionSet: '{ uid }',
|
|
239
239
|
resolve: together,
|
|
240
240
|
}
|
|
241
241
|
})
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/algolia-recommend",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.103",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"generate": "tsx scripts/generate-recommend-spec.mts"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@graphcommerce/algolia-products": "^9.0.0-canary.
|
|
19
|
-
"@graphcommerce/graphql": "^9.0.0-canary.
|
|
20
|
-
"@graphcommerce/graphql-mesh": "^9.0.0-canary.
|
|
21
|
-
"@graphcommerce/next-config": "^9.0.0-canary.
|
|
22
|
-
"@graphcommerce/next-ui": "^9.0.0-canary.
|
|
18
|
+
"@graphcommerce/algolia-products": "^9.0.0-canary.103",
|
|
19
|
+
"@graphcommerce/graphql": "^9.0.0-canary.103",
|
|
20
|
+
"@graphcommerce/graphql-mesh": "^9.0.0-canary.103",
|
|
21
|
+
"@graphcommerce/next-config": "^9.0.0-canary.103",
|
|
22
|
+
"@graphcommerce/next-ui": "^9.0.0-canary.103",
|
|
23
23
|
"react": "^18.2.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|