Skip to content

allow passing an idempotencyKey - #108

Open
ianmacartney wants to merge 1 commit into
mainfrom
issue-107
Open

allow passing an idempotencyKey#108
ianmacartney wants to merge 1 commit into
mainfrom
issue-107

Conversation

@ianmacartney

@ianmacartney ianmacartney commented Jul 25, 2026

Copy link
Copy Markdown
Member

Fixes #107

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pkg-pr-new

pkg-pr-new Bot commented Jul 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@convex-dev/resend@108

commit: e7269f8

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: get-convex/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bb43bd97-e2f3-48cb-87e9-52c8b0046810

📥 Commits

Reviewing files that changed from the base of the PR and between 2f6a91d and e7269f8.

⛔ Files ignored due to path filters (1)
  • src/component/_generated/component.ts is excluded by !**/_generated/**
📒 Files selected for processing (6)
  • CHANGELOG.md
  • README.md
  • src/client/index.ts
  • src/component/lib.test.ts
  • src/component/lib.ts
  • src/component/schema.ts

📝 Walkthrough

Walkthrough

sendEmail now accepts an optional idempotencyKey. The mutation checks for an existing email with the same key and returns its EmailId instead of creating a duplicate, while persisting the key on new records. The schema and client type definitions were updated, tests cover keyed and unkeyed enqueue behavior, and documentation describes the feature.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Resend.sendEmail
  participant emails
  Client->>Resend.sendEmail: provide idempotencyKey
  Resend.sendEmail->>emails: look up matching key
  emails-->>Resend.sendEmail: existing EmailId or no match
  Resend.sendEmail->>emails: enqueue and persist key
  emails-->>Resend.sendEmail: return EmailId
Loading

Possibly related issues

Suggested reviewers: sethconvex

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description only references an issue number and does not describe the changes, so its relevance is unclear. Replace the issue-only note with a brief description of the change, such as adding enqueue-time idempotency via idempotencyKey.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding support for passing an idempotencyKey.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-107

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/client/index.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

src/component/lib.test.ts

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

src/component/lib.ts

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

  • 1 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accept a caller-supplied idempotency key in sendEmail for enqueue-time dedupe

1 participant