From 393ac8d885cf9fe85d8ca88e8c1963e4e067d430 Mon Sep 17 00:00:00 2001 From: Obad Zafar Date: Thu, 1 May 2025 11:58:13 +0500 Subject: [PATCH] docs: fix TypeScript errors in marketplace vendor tutorial (#12302) The index.ts code example in "Create Workflow" section of the Marketplace Vendor Tutorial contains TypeScript errors that prevent successful compilation: Missing transform import: The tutorial uses the transform function on line 33, but it's not imported from "@medusajs/framework/workflows-sdk" TypeScript union type complexity error: When working with the useQueryGraphStep function, TypeScript throws "Expression produces a union type that is too complex to represent" error Incorrect export name: On line 67, the export is export default createVendorAdminWorkflow but the workflow is defined as createVendorWorkflow (line 24) These errors make it impossible for developers to follow the tutorial successfully without debugging TypeScript errors. Closes #12301 --- .../app/recipes/marketplace/examples/vendors/page.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx index 05c3ea0416..02153d9895 100644 --- a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx +++ b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx @@ -588,6 +588,7 @@ export const vendorWorkflowHighlights = [ import { createWorkflow, WorkflowResponse, + transform, } from "@medusajs/framework/workflows-sdk" import { setAuthAppMetadataStep, @@ -636,7 +637,7 @@ const createVendorWorkflow = createWorkflow( actorType: "vendor", value: vendorAdmin.id, }) - + // @ts-ignore const { data: vendorWithAdmin } = useQueryGraphStep({ entity: "vendor", fields: ["id", "name", "handle", "logo", "admins.*"], @@ -651,7 +652,7 @@ const createVendorWorkflow = createWorkflow( } ) -export default createVendorAdminWorkflow +export default createVendorWorkflow ``` You create a workflow with `createWorkflow` from the Workflows SDK. It accepts two parameters: