Skip to content

Support transactional mutations in Amplify without custom resolvers #713

Description

@oe-bayram

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions