Open
Description
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.