Skip to content

Commit f07d31b

Browse files
committed
updates
1 parent 909b661 commit f07d31b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

components/sanity/actions/query-dataset/query-dataset.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default {
2222
query: {
2323
type: "string",
2424
label: "Query",
25-
description: "The GROQ query to run. Example: `*[_type == 'movie']`",
25+
description: "The GROQ query to run. Example: `*[_type == 'movie']`. Note: The default query `*` returns all documents in the dataset.",
2626
default: "*",
2727
},
2828
},

components/sanity/sanity.app.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export default {
2222
const response = await this.queryDataset({
2323
dataset,
2424
params: {
25-
query: `* | order(_id) [${DEFAULT_LIMIT * page}...${DEFAULT_LIMIT * (page + 1)}]`,
25+
query: `* | order(_id) [${DEFAULT_LIMIT * page}...${DEFAULT_LIMIT * (page + 1)}]`,
2626
},
2727
});
28-
return response.result.map(({ _id }) => _id);
28+
return response.result?.map(({ _id }) => _id) || [];
2929
},
3030
},
3131
},

components/sanity/sources/new-document-event/new-document-event.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
on: {
1515
type: "string[]",
1616
label: "Type",
17-
description: "The type of document event(s)to listen for",
17+
description: "The type of document event(s) to listen for",
1818
options: [
1919
"create",
2020
"update",

0 commit comments

Comments
 (0)