Skip to content

Commit ddaeafa

Browse files
authored
docs: fix metadata destructure in query.graph (medusajs#11294)
1 parent 462c3e8 commit ddaeafa

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

www/apps/book/app/learn/customization/customize-admin/route/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const GET = async (
4343

4444
const {
4545
data: brands,
46-
metadata: { count, take, skip },
46+
metadata: { count, take, skip } = {},
4747
} = await query.graph({
4848
entity: "brand",
4949
...req.queryConfig,

www/apps/book/app/learn/fundamentals/module-links/query/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Filters don't apply on fields of linked data models from other modules.
217217
```ts highlights={[["8", "skip", "The number of records to skip before fetching the results."], ["9", "take", "The number of records to fetch."]]}
218218
const {
219219
data: myCustoms,
220-
metadata: { count, take, skip },
220+
metadata: { count, take, skip } = {},
221221
} = await query.graph({
222222
entity: "my_custom",
223223
fields: ["id", "name"],

www/apps/book/generated/edit-dates.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const generatedEditDates = {
7575
"app/learn/fundamentals/module-links/custom-columns/page.mdx": "2025-01-06T11:19:13.178Z",
7676
"app/learn/fundamentals/module-links/directions/page.mdx": "2024-12-12T15:31:31.555Z",
7777
"app/learn/fundamentals/module-links/page.mdx": "2024-12-09T14:39:26.668Z",
78-
"app/learn/fundamentals/module-links/query/page.mdx": "2024-12-09T15:54:44.798Z",
78+
"app/learn/fundamentals/module-links/query/page.mdx": "2025-02-04T07:35:31.633Z",
7979
"app/learn/fundamentals/modules/db-operations/page.mdx": "2024-12-09T14:40:50.581Z",
8080
"app/learn/fundamentals/modules/multiple-services/page.mdx": "2024-10-21T13:30:21.370Z",
8181
"app/learn/fundamentals/modules/page.mdx": "2025-01-16T08:34:28.947Z",
@@ -88,7 +88,7 @@ export const generatedEditDates = {
8888
"app/learn/customization/extend-features/extend-create-product/page.mdx": "2025-01-06T11:18:58.250Z",
8989
"app/learn/customization/custom-features/page.mdx": "2024-12-09T10:46:28.593Z",
9090
"app/learn/customization/customize-admin/page.mdx": "2024-12-09T11:02:38.801Z",
91-
"app/learn/customization/customize-admin/route/page.mdx": "2025-01-27T08:45:19.021Z",
91+
"app/learn/customization/customize-admin/route/page.mdx": "2025-02-04T07:35:04.523Z",
9292
"app/learn/customization/customize-admin/widget/page.mdx": "2025-01-27T08:45:19.022Z",
9393
"app/learn/customization/extend-features/define-link/page.mdx": "2024-12-09T11:02:39.346Z",
9494
"app/learn/customization/extend-features/page.mdx": "2024-12-09T11:02:39.244Z",

www/apps/resources/app/examples/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ export const GET = async (
20282028

20292029
const {
20302030
data: myCustoms,
2031-
metadata: { count, take, skip },
2031+
metadata: { count, take, skip } = {},
20322032
} = await query.graph({
20332033
entity: "my_custom",
20342034
fields: ["id", "name"],

www/apps/resources/app/integrations/guides/sanity/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ export const syncStep = createStep(
711711
while (hasMore) {
712712
const {
713713
data: products,
714-
metadata: { count },
714+
metadata: { count } = {},
715715
} = await query.graph({
716716
entity: "product",
717717
fields: [

www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export const GET = async (
361361

362362
const {
363363
data: digitalProducts,
364-
metadata: { count, take, skip },
364+
metadata: { count, take, skip } = {},
365365
} = await query.graph({
366366
entity: "digital_product",
367367
fields: [

www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ export const GET = async (
10631063

10641064
const {
10651065
data: subscriptions,
1066-
metadata: { count, take, skip },
1066+
metadata: { count, take, skip } = {},
10671067
} = await query.graph({
10681068
entity: "subscription",
10691069
fields: [

www/apps/resources/generated/edit-dates.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const generatedEditDates = {
112112
"app/nextjs-starter/page.mdx": "2025-01-06T12:19:31.143Z",
113113
"app/recipes/b2b/page.mdx": "2025-01-29T11:35:23.247Z",
114114
"app/recipes/commerce-automation/page.mdx": "2024-10-16T08:52:01.585Z",
115-
"app/recipes/digital-products/examples/standard/page.mdx": "2025-01-13T11:31:35.362Z",
115+
"app/recipes/digital-products/examples/standard/page.mdx": "2025-02-04T07:36:59.024Z",
116116
"app/recipes/digital-products/page.mdx": "2025-01-06T11:19:35.623Z",
117117
"app/recipes/ecommerce/page.mdx": "2024-10-22T11:01:01.218Z",
118118
"app/recipes/integrate-ecommerce-stack/page.mdx": "2024-12-09T13:03:35.846Z",
@@ -123,7 +123,7 @@ export const generatedEditDates = {
123123
"app/recipes/oms/page.mdx": "2024-07-01T10:21:19+03:00",
124124
"app/recipes/personalized-products/page.mdx": "2024-10-03T13:07:44.153Z",
125125
"app/recipes/pos/page.mdx": "2024-10-03T13:07:13.964Z",
126-
"app/recipes/subscriptions/examples/standard/page.mdx": "2025-01-06T11:19:35.640Z",
126+
"app/recipes/subscriptions/examples/standard/page.mdx": "2025-02-04T07:37:14.832Z",
127127
"app/recipes/subscriptions/page.mdx": "2024-10-03T13:07:44.155Z",
128128
"app/recipes/page.mdx": "2024-07-11T15:56:41+00:00",
129129
"app/service-factory-reference/methods/create/page.mdx": "2024-07-31T17:01:33+03:00",
@@ -2176,7 +2176,7 @@ export const generatedEditDates = {
21762176
"app/commerce-modules/sales-channel/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.620Z",
21772177
"app/commerce-modules/stock-location/links-to-other-modules/page.mdx": "2025-01-06T11:19:35.619Z",
21782178
"app/commerce-modules/store/links-to-other-modules/page.mdx": "2024-12-24T14:58:24.038Z",
2179-
"app/examples/page.mdx": "2025-01-06T11:19:35.623Z",
2179+
"app/examples/page.mdx": "2025-02-04T07:36:39.956Z",
21802180
"app/medusa-cli/commands/build/page.mdx": "2024-11-11T11:00:49.665Z",
21812181
"app/js-sdk/page.mdx": "2024-12-12T11:41:51.152Z",
21822182
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.apiKey/page.mdx": "2025-01-13T18:05:58.463Z",
@@ -3147,7 +3147,7 @@ export const generatedEditDates = {
31473147
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminBatchProductVariantRequest/page.mdx": "2024-12-09T13:21:34.309Z",
31483148
"references/types/WorkflowTypes/ProductWorkflow/interfaces/types.WorkflowTypes.ProductWorkflow.ExportProductsDTO/page.mdx": "2025-01-13T18:05:55.538Z",
31493149
"app/contribution-guidelines/admin-translations/page.mdx": "2024-11-14T08:54:15.369Z",
3150-
"app/integrations/guides/sanity/page.mdx": "2025-01-06T13:52:48.705Z",
3150+
"app/integrations/guides/sanity/page.mdx": "2025-02-04T07:36:48.007Z",
31513151
"references/api_key/types/api_key.FindConfigOrder/page.mdx": "2024-11-25T17:49:28.715Z",
31523152
"references/auth/types/auth.FindConfigOrder/page.mdx": "2024-11-25T17:49:28.887Z",
31533153
"references/cart/types/cart.FindConfigOrder/page.mdx": "2024-11-25T17:49:29.455Z",

0 commit comments

Comments
 (0)