get-convex / get-convex/workflow
Return lazy promises from steps instead of concrete values
Open
enhancement
- Dominant language
- TypeScript
- Stars
- 81
- Forks
- 17
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
Return promises of values instead of values, so once steps that depend on a value have run, the values aren't loaded when evaluating later steps
```ts
const lazyEmbedding = await step.runAction(..., { lazy: true });
const foo = await step.runMutation(api.foo.bar, { embedding: lazyEmbedding });
```
the args are now `LazyValue` where `LazyValue` is either a `Value` or `Promise` for primitives, or `LazyValue[]` or `Record` or `{ [K in keyof T]: T[K] | Promise }`
Contributor guide
Assessment
This issue has not been assessed yet.