Skip to content

Conversation

ferntheplant
Copy link

Re-export the WorkflowStep type for use in helpers like

async function someWorkflowLogic(step: WorkflowStep, input: string) {
  const output = await step.runMutation(...)
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ianmacartney
Copy link
Contributor

This change is already in the alpha as part of #138 if you want to give that a whirl!

Copy link

pkg-pr-new bot commented Oct 10, 2025

Open in StackBlitz

npm i https://pkg.pr.new/get-convex/workflow/@convex-dev/workflow@141

commit: 86ee8f5

@ferntheplant
Copy link
Author

Ah perfect that works. Thanks!

@ferntheplant
Copy link
Author

@ianmacartney sorry may have spoke too soon. Actually the WorkflowStep that is exported in the alpha is not the same one as before. Seems like what I actually want is WorkflowCtx (i.e. the thing that runs .runMutation(...) etc. I can grab it with some funny type shenanigans on the parameters of workflow.define but it'd be nice to have it exported directly too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants