Skip to content

Conversation

@fossamagna
Copy link

@fossamagna fossamagna commented Oct 16, 2025

Problem

Issue number, if available:

aws-amplify/amplify-category-api#3306

Changes

This pull request introduces support for field-level resolvers (handlers) in the @aws-amplify/data-schema package, allowing developers to attach custom logic directly to individual fields in their models. The implementation includes updates to the schema builder API, schema processing logic, and related tests and documentation.

Field-level handler support:

  • Added a new .handler() method to the ModelField builder, enabling the attachment of field-level resolvers (handlers) to fields. This is reflected in both the type definitions and the runtime implementation (ModelField.ts).

Corresponding docs PR, if applicable:

Validation

  • Unit Tests (Added new tests and snapshots to verify that field-level handlers can be attached and are correctly represented in the generated schema.)

Checklist

  • If this PR includes a functional change to the runtime or type-level behavior of the code, I have added or updated automated test coverage for this change. (see Testing Strategy README)
  • If this PR requires a docs update, I have linked to that docs PR above.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2025

🦋 Changeset detected

Latest commit: 975f3fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@aws-amplify/data-schema Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@fossamagna fossamagna marked this pull request as ready for review October 21, 2025 15:55
@fossamagna fossamagna requested review from a team as code owners October 21, 2025 15:55
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.

1 participant