musora-content-services 2.99.2 → 2.99.4
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
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.99.4](https://github.com/railroadmedia/musora-content-services/compare/v2.99.3...v2.99.4) (2025-12-09)
|
|
6
|
+
|
|
7
|
+
### [2.99.3](https://github.com/railroadmedia/musora-content-services/compare/v2.99.2...v2.99.3) (2025-12-09)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **agi:** optional query options property access ([e8d9a33](https://github.com/railroadmedia/musora-content-services/commit/e8d9a333462dc8bcfed7af9171bff4380c9d67fd))
|
|
13
|
+
* **groq:** query order and slicing out of place ([97a3c1c](https://github.com/railroadmedia/musora-content-services/commit/97a3c1c9d27745ee78894f3d2c9c5d3e8195efb0))
|
|
14
|
+
|
|
5
15
|
### [2.99.2](https://github.com/railroadmedia/musora-content-services/compare/v2.99.1...v2.99.2) (2025-12-09)
|
|
6
16
|
|
|
7
17
|
|
package/package.json
CHANGED
package/src/lib/sanity/query.ts
CHANGED
|
@@ -111,10 +111,10 @@ export const query = (): QueryBuilder => {
|
|
|
111
111
|
|
|
112
112
|
return `
|
|
113
113
|
*[${filter}]
|
|
114
|
-
${ordering}
|
|
115
|
-
${slice}
|
|
116
114
|
${projection.length > 0 ? `{ ${projection} }` : ''}
|
|
117
115
|
${state.postFilter ? `[${state.postFilter}]` : ''}
|
|
116
|
+
${ordering}
|
|
117
|
+
${slice}
|
|
118
118
|
`.trim()
|
|
119
119
|
},
|
|
120
120
|
|
|
@@ -41,8 +41,8 @@ export async function fetchArtists(
|
|
|
41
41
|
|
|
42
42
|
const data = query()
|
|
43
43
|
.and(`_type == "artist"`)
|
|
44
|
-
.order(options
|
|
45
|
-
.slice(options
|
|
44
|
+
.order(options?.sort || 'lower(name) asc')
|
|
45
|
+
.slice(options?.offset || 0, (options?.offset || 0) + (options?.limit || 20))
|
|
46
46
|
.select(
|
|
47
47
|
'name',
|
|
48
48
|
`"slug": slug.current`,
|
|
@@ -41,8 +41,8 @@ export async function fetchGenres(
|
|
|
41
41
|
|
|
42
42
|
const data = query()
|
|
43
43
|
.and(`_type == "genre"`)
|
|
44
|
-
.order(options
|
|
45
|
-
.slice(options
|
|
44
|
+
.order(options?.sort || 'lower(name) asc')
|
|
45
|
+
.slice(options?.offset || 0, (options?.offset || 0) + (options?.limit || 20))
|
|
46
46
|
.select(
|
|
47
47
|
'name',
|
|
48
48
|
`"slug": slug.current`,
|
|
@@ -42,8 +42,8 @@ export async function fetchInstructors(
|
|
|
42
42
|
|
|
43
43
|
const data = query()
|
|
44
44
|
.and(`_type == "instructor"`)
|
|
45
|
-
.order(options
|
|
46
|
-
.slice(options
|
|
45
|
+
.order(options?.sort || 'lower(name) asc')
|
|
46
|
+
.slice(options?.offset || 0, (options?.offset || 0) + (options?.limit || 20))
|
|
47
47
|
.select(
|
|
48
48
|
'name',
|
|
49
49
|
`"slug": slug.current`,
|