@graphcommerce/algolia-categories 9.0.0-canary.98 → 9.0.0

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,32 +1,42 @@
1
1
  # @graphcommerce/algolia-categories
2
2
 
3
- ## 9.0.0-canary.98
3
+ ## 9.0.0
4
4
 
5
- ## 9.0.0-canary.97
5
+ ### Major Changes
6
6
 
7
- ## 9.0.0-canary.96
7
+ - [#2377](https://github.com/graphcommerce-org/graphcommerce/pull/2377) [`bca47b8`](https://github.com/graphcommerce-org/graphcommerce/commit/bca47b81061ea8608753cfc8940ce4db65ab27e3) - Enables Algolia category search in GraphQL Mesh. Integrated Algolia category search into the `categories` type within the Mesh. This will only be used on search pages. ([@Renzovh](https://github.com/Renzovh))
8
8
 
9
- ## 9.0.0-canary.95
9
+ ## 9.0.0-canary.118
10
10
 
11
- ## 9.0.0-canary.94
11
+ ## 9.0.0-canary.117
12
12
 
13
- ## 9.0.0-canary.93
13
+ ## 9.0.0-canary.116
14
14
 
15
- ## 9.0.0-canary.92
15
+ ## 9.0.0-canary.115
16
16
 
17
- ## 9.0.0-canary.91
17
+ ## 9.0.0-canary.114
18
18
 
19
- ## 9.0.0-canary.90
19
+ ## 9.0.0-canary.113
20
20
 
21
- ## 9.0.0-canary.89
21
+ ## 9.0.0-canary.112
22
22
 
23
- ## 9.0.0-canary.88
23
+ ## 9.0.0-canary.111
24
24
 
25
- ## 9.0.0-canary.87
25
+ ## 9.0.0-canary.110
26
26
 
27
- ## 9.0.0-canary.86
27
+ ## 9.0.0-canary.109
28
28
 
29
- ## 9.0.0-canary.85
29
+ ## 9.0.0-canary.108
30
+
31
+ ## 9.0.0-canary.107
32
+
33
+ ## 9.0.0-canary.106
34
+
35
+ ## 9.0.0-canary.105
36
+
37
+ ## 9.0.0-canary.104
38
+
39
+ ## 9.0.0-canary.103
30
40
 
31
41
  ## 9.0.0-canary.84
32
42
 
@@ -1,14 +1,14 @@
1
1
  import { algoliaUrlToUrlKey } from '@graphcommerce/algolia-products/mesh/algoliaHitToMagentoProduct'
2
- import { GetStoreConfigReturn } from '@graphcommerce/algolia-products/mesh/getStoreConfig'
3
- import {
2
+ import type { GetStoreConfigReturn } from '@graphcommerce/algolia-products/mesh/getStoreConfig'
3
+ import type {
4
+ AlgoliaProductHitAdditionalProperties,
5
+ Algoliahit,
6
+ MeshContext,
7
+ QuerycategoriesArgs,
4
8
  RequireFields,
5
9
  ResolverFn,
6
10
  ResolversParentTypes,
7
11
  ResolversTypes,
8
- MeshContext,
9
- QuerycategoriesArgs,
10
- Algoliahit,
11
- AlgoliaProductHitAdditionalProperties,
12
12
  } from '@graphcommerce/graphql-mesh'
13
13
 
14
14
  export type AlgoliaCategoryHitAddiotonalProperties = AlgoliaProductHitAdditionalProperties & {
@@ -20,7 +20,7 @@ export type AlgoliaCategoryHitAddiotonalProperties = AlgoliaProductHitAdditional
20
20
  level: number
21
21
  }
22
22
 
23
- export function assertAdditional(
23
+ function assertAdditional(
24
24
  additional: unknown,
25
25
  ): additional is AlgoliaCategoryHitAddiotonalProperties {
26
26
  return true
@@ -1,4 +1,4 @@
1
- import { MeshContext, QuerycategoryListArgs } from '@graphcommerce/graphql-mesh'
1
+ import type { MeshContext, QuerycategoryListArgs } from '@graphcommerce/graphql-mesh'
2
2
  import type { GraphQLResolveInfo } from 'graphql'
3
3
  import { getCategoryResultsInput } from './getCategoryResultsInput'
4
4
  import { getIndexName } from './getIndexName'
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  Queryalgolia_searchSingleIndexArgs,
3
3
  QuerycategoryListArgs,
4
4
  } from '@graphcommerce/graphql-mesh'
@@ -1,4 +1,4 @@
1
- import { MeshContext } from '@graphcommerce/graphql-mesh'
1
+ import type { MeshContext } from '@graphcommerce/graphql-mesh'
2
2
  import { storefrontConfigDefault } from '@graphcommerce/next-ui'
3
3
 
4
4
  function getStoreHeader(context: MeshContext) {
package/mesh/resolvers.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { getStoreConfig } from '@graphcommerce/algolia-products/mesh/getStoreConfig'
2
2
  import { type Resolvers } from '@graphcommerce/graphql-mesh'
3
- import { algoliaHitToMagentoCategory, CategoriesItemsItem } from './algoliaHitToMagentoCategory'
3
+ import type { CategoriesItemsItem } from './algoliaHitToMagentoCategory'
4
+ import { algoliaHitToMagentoCategory } from './algoliaHitToMagentoCategory'
4
5
  import { getCategoryResults } from './getCategoryResults'
5
6
 
6
7
  export const resolvers: Resolvers = {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/algolia-categories",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.98",
5
+ "version": "9.0.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -15,19 +15,19 @@
15
15
  "generate": "tsx scripts/generate-spec.mts"
16
16
  },
17
17
  "peerDependencies": {
18
- "@graphcommerce/algolia-products": "^9.0.0-canary.98",
19
- "@graphcommerce/google-datalayer": "^9.0.0-canary.98",
20
- "@graphcommerce/graphql": "^9.0.0-canary.98",
21
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.98",
22
- "@graphcommerce/magento-customer": "^9.0.0-canary.98",
23
- "@graphcommerce/magento-product": "^9.0.0-canary.98",
24
- "@graphcommerce/magento-search": "^9.0.0-canary.98",
25
- "@graphcommerce/next-config": "^9.0.0-canary.98",
26
- "@graphcommerce/next-ui": "^9.0.0-canary.98",
18
+ "@graphcommerce/algolia-products": "^9.0.0",
19
+ "@graphcommerce/google-datalayer": "^9.0.0",
20
+ "@graphcommerce/graphql": "^9.0.0",
21
+ "@graphcommerce/graphql-mesh": "^9.0.0",
22
+ "@graphcommerce/magento-customer": "^9.0.0",
23
+ "@graphcommerce/magento-product": "^9.0.0",
24
+ "@graphcommerce/magento-search": "^9.0.0",
25
+ "@graphcommerce/next-config": "^9.0.0",
26
+ "@graphcommerce/next-ui": "^9.0.0",
27
27
  "react": "^18.2.0"
28
28
  },
29
29
  "devDependencies": {
30
- "graphql": "^16.0.0",
31
- "tsx": "^4.16.2"
30
+ "graphql": "^16.10.0",
31
+ "tsx": "^4.19.2"
32
32
  }
33
33
  }
@@ -0,0 +1,11 @@
1
+ import type { ProductListQueryVariables } from '@graphcommerce/magento-product'
2
+
3
+ export function applyEngineVariables(variables: ProductListQueryVariables | undefined) {
4
+ return {
5
+ ...variables,
6
+ filters: {
7
+ ...variables?.filters,
8
+ engine: { eq: 'algolia' },
9
+ },
10
+ }
11
+ }