-
Notifications
You must be signed in to change notification settings - Fork 200
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
fix: Support new list name pluralization #1451
Conversation
c7223af
to
ee235a4
Compare
Codecov Report
@@ Coverage Diff @@
## main #1451 +/- ##
==========================================
+ Coverage 58.48% 58.51% +0.02%
==========================================
Files 678 678
Lines 20729 20741 +12
==========================================
+ Hits 12124 12137 +13
+ Misses 8605 8604 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
ee235a4
to
653aa68
Compare
653aa68
to
5c50205
Compare
Related issue discovered #1488 |
8ade4b9
to
2090f27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lawmicha Do we need test cases for all the permutations?
This has been released in https://github.com/aws-amplify/amplify-ios/releases/tag/v1.15.4 |
Thank you @lawmicha Here is what I did and it is not working
It still fails at runtime. I noticed the following (`NoteData' is my model name) ModelSchema+GraphQL.swift if let listPluralName = listPluralName {
graphQLName = queryType.rawValue + listPluralName
} else {
graphQLName = (queryType.rawValue + name).pluralize()
} Looks like Workaround that works for me is to add model.listPluralName = "NoteData" |
hey @sebsto, sorry I wasn't clear, the codegen changes still need to be released. What you have there is the correct workaround by modifying what the codegen would be generating |
I thought that CLI 6.3.0 and this PR is fixing the pluralisation aws-amplify/amplify-cli#8401 What is the CLI PR to track ? |
that one sets the flag as false for new projects, this one aws-amplify/amplify-codegen#255 adds code that generates the new fields based on the flag |
Issue #, if available:
aws-amplify/amplify-cli#8350
Description of changes:
listPluralName
andsyncPluralName
improvepluralization
true (this is on by default), and rerun integration testsCheck points:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.