Custom primary key is not supported by the GraphQL helper #2061
Labels
duplicate
This issue or pull request already exists
feature-request
A request for a new feature or an enhancement to an existing API or category.
GraphQL API
Issues related to the API (GraphQL) Category
Description
I'm migrating an Amplify JavaScript project to Amplify Flutter, a few of my GraphQL models look like this:
Everything worked well in the JS project. I did an
amplify pull
in the new Flutter project, the GraphQL schema file was correctly pulled down, then I ranamplify codegen models
, aFoo.dart
is created, which looks like this:My code for querying data from the
Foo
table:I always get a validation error. "Validation error of type FieldUndefined: Field 'id' in type 'Foo' is undefined @ 'listFoo/items/id'". Why does codegen generate a model file that doesn't match the actual GraphQL model?
Categories
Steps to Reproduce
See description.
Screenshots
No response
Platforms
Android Device/Emulator API Level
No response
Environment
Dependencies
Device
N/A
OS
iOS 15.5
Deployment Method
Custom Pipeline
CLI Version
9.2.1
Additional Context
No response
Amplify Config
Not sure how to get this..
The text was updated successfully, but these errors were encountered: