aws-amplify / aws-amplify/amplify-data

Support transactional mutations in Amplify without custom resolvers

Open
#713 1 comment 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
TypeScript
Stars
18
Forks
23
Avg merge
26m
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**
Today, if we want multiple write operations to succeed or fail together, we need to create custom resolvers or Lambda logic. This adds extra complexity for use cases that are common in real applications.

For example, one action may need to:
- create a `Contract`
- create a related `AuditLog` entry
- update a counter or summary item

These operations should be atomic. If one fails, none of them should be written.

**Describe the solution you'd like**
It would be helpful if Amplify Data supported transactional mutations out of the box, backed by AppSync/DynamoDB transaction support.

For example, a single generated or configurable mutation could execute multiple writes as one transaction, instead of requiring a custom resolver.

Example idea:
`createContractWithAudit()`
This mutation would create the contract, create the audit log, and update related metadata in one transaction.

**Describe alternatives you've considered**
The current alternative is to implement a custom mutation with a custom AppSync resolver or Lambda function using `TransactWriteItems`. This works, but it removes part of the benefit of using the generated Amplify Data API.

**Additional context**
The main goal is to support atomic multi-write operations in a simple and standard Amplify Data workflow. This would reduce boilerplate and make transactional use cases much easier to implement.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are identified. Start by surveying the generated Amplify Data mutation flow and the custom resolver or Lambda alternative, then compare how AppSync and DynamoDB transactions could fit; done means atomic multi-write mutations work without custom resolvers.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
api, backend-api-design, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.