Skip to content

Add inline query and mutation blocks #17

Open
@sujayakar

Description

@sujayakar
await step.inlineQuery(async (ctx) => {
  ...
});
let id;
await step.inlineMutation(async (ctx) => {
  const doc = await ctx.db.get(id); // can reference things in closure
  id = doc.nextId; // can even set things in closure w/o affecting determinism.
  await ctx.db.patch(doc._id, { nextId: null });
});

to maintain determinism, we'd journal each operation in a block.

this may interact poorly with transaction size limits -- we may want to find a way to be defensive and throw an error before the workflow mutation hits the global limit.

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