aws-amplify / aws-amplify/docs

How to ensure a field in a type is unique on recent amplify version

Open
#7,851 3 comments 1 reaction 0 assignees View on GitHub
amplify/data p3 transferred
Dominant language
MDX
Stars
506
Forks
1.1k
Avg merge
3h 14m
Merged PRs (30d)
1

Description

### Amplify CLI Version

12.3.0

### Question

I'm trying to define a unique field in my model. I've tried this guide: https://dev.to/callmekatootie/aws-appsync-with-amplify-how-to-ensure-a-field-in-a-type-is-unique-51hp but it refers to the outdated/legacy/(deprecated ?) version of the documentation.

It's not clear to me how to achieve the same on using the new resolver logic (This: https://docs.amplify.aws/cli/graphql/custom-business-logic/#lambda-function-resolver ).

Can anyone provide a step-by-step example?

Contributor guide

Open the contributing guide

Research direction

Compare the linked legacy guide with the current Amplify custom business logic documentation at docs.amplify.aws/cli/graphql/custom-business-logic/#lambda-function-resolver. Add a step-by-step example for defining a unique model field with Amplify CLI 12.3.0, and verify that the documented workflow matches the current resolver logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql
Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.