Defer enables you to attach metadata (key/value pairs) to an execution. This is useful for example if you want search all executions for a specific user.


Below the list of requirements we apply on metadata:

  • No more than 25 metadata (key/value pairs) per exection
  • key & value format:
    • Must be a string.
    • Must have lenght between 1 and 256.
    • Must only only contain printable ASCII characters (ASCII code must be between 32 and 127).


import { assignOptions } from "@defer/client";
import { sayHello } from "./defer/sayHello";

const hello = assignOptions(sayHello, {
  metadata: {
    userId: "7",
    email: "john@example.com",
await hello("John Doe");