Amplify-cli: Datastore: amplify codegen model (amplify-modelgen) generates string instead of String type in schema.js

Created on 7 Dec 2019  Â·  2Comments  Â·  Source: aws-amplify/amplify-cli

Describe the bug
amplify codegen model (amplify-modelgen) generates string instead of String type in schema.js

When following the Amplify DataStore – Simplify Development of Offline Apps with GraphQL blog post, I noticed that the /graphql API resource was not returning the title property, resulting in odd UI behavior:

no_title

The root of the issue seems to be that amplify codegen model (or npm run amplify-modelgen) generates string instead of String type for the title property in /src/models/schema.js

Screen Shot 2019-12-07 at 10 30 56 AM

When updating the type to String, the demo app from the blog post works as expected.

Amplify CLI Version
4.5.0

To Reproduce
Follow the directions specified on this blog or @sebsto's abbreviated instructions

Expected behavior
The amplify codegen model command should generate schema.js where the String data type is properly cased, where the S is capitalized.

Desktop (please complete the following information):

  • OS: Amazon Linux. Cloud9 Cloud9Default AMI. ami-0433265c8b987b1a0
  • Node Version: v10.17.0

Most helpful comment

@sebsto @jordan-patapoff this has now been released to npm

All 2 comments

@nikhname thanks for addressing this quickly. Do you know in what version the fix will be available ?

@sebsto @jordan-patapoff this has now been released to npm

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ReidWeb picture ReidWeb  Â·  3Comments

gabriel-wilkes picture gabriel-wilkes  Â·  3Comments

onlybakam picture onlybakam  Â·  3Comments

nicksmithr picture nicksmithr  Â·  3Comments

nason picture nason  Â·  3Comments