Skip to content

Return lazy promises from steps instead of concrete values #33

@ianmacartney

Description

@ianmacartney

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

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<Value> for primitives, or LazyValue[] or Record<string, LazyValue> or { [K in keyof T]: T[K] | Promise<T[K]> }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions