Skip to content

Commit

Permalink
chore: changeset clean release note
Browse files Browse the repository at this point in the history
  • Loading branch information
charlypoly committed Mar 5, 2023
1 parent 949564f commit 8ffcf7d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .changeset/beige-worms-smoke.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,22 @@
"@defer/client": minor
---

expose a `getExecution(id)` function
expose `getExecution(id)` to poll for an execution status and result:

```ts
import { type FetchExecutionResponse, getExecution } from "@defer/client";
import type { NextApiRequest, NextApiResponse } from "next";

type Response = {
res: FetchExecutionResponse;
};

export default async function handler(
req: NextApiRequest,
res: NextApiResponse<Response>
) {
const executionId = req.query.id;
const ret = await getExecution(executionId as string);
res.status(200).json({ res: ret });
}
```

0 comments on commit 8ffcf7d

Please sign in to comment.