New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All Models are nested deeper under "type" #2530
Comments
Hey👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂 |
@ideen1 - can you confirm your package.json file? I can't seem to reproduce your issue |
Hey @renebrandel I have also reproduced this on a brand new app setup with: My package JSON contains the following relevant modules:
Here is an image with the type of the default project Schema, also showing the issue: |
@renebrandel Okay I found something significant: Even the amplify-next-pages-template has this issue. See: Line #8 on https://github.com/aws-samples/amplify-next-pages-template/blob/main/pages/index.tsx The Official Gen 2 docs do not reflect this change but, it seems as though the creator of the template also encountered the issue and adjusted for it. This template and the docs are inconsistent with each other. The issue does not seem to be consistent though because you are not seeing it. A quick look at the PR mentioned in my original message shows that the data-schema module changed these lines potentially causing this issue:
^This excerpt is from @aws-amplify/data-schema/dist/esm/ClientSchema.d.ts |
Environment information
Description
After updating @aws-amplify/backend to 1.0.0, all of my model's data is now nested one level deeper under a field called
type
. For Example, before I could goclient.models.list().data.id
whereas now I must goclient.models.list().data.type.id
Potential cause: It seems to be introduced by a version bump of data-schema in PR aws-amplify/amplify-backend#1399
A
type
field has been added to theInternalClientSchema
type within data-schema.The text was updated successfully, but these errors were encountered: