Can't generate models if schema used identifier function #909
Labels
Gen 2
pending-triage
Issues that need further discussion to determine
transferred
Issue has been transferred from another Amplify repository
Environment information
Describe the bug
It seems like if I specify an identifier on my schema models, then I'm not able to generate graphql-client-code. If I do have an identifier, whether composite or single value, i get the following error when I run the generate command:
TypeError: Cannot read properties of undefined (reading 'primaryKeyInfo')
Reproduction steps
I have a schema model like so:
The goal is to have a composite identifier made up of userId, shopId and productId, but I have also tried with just e.g shopId and gotten the same result.
The command I run is:
npx ampx generate graphql-client-code --format modelgen --model-target dart --out lib/src/db --stack <stack-name>
The text was updated successfully, but these errors were encountered: