Describe the bug
minor issue where if for whatever reason you want to add an 's' to the end of a type name the generated graphql queries are not following the same behaviour for plurals.
e.g.
type Books @model {
id: ID!
desc: String
}
generates
type Query {
syncBooks()
getBooks()
listBookss()
}
Expected Behaviour
I think the Android Datastore SDK expects syncBookss same as listBookss
Amplify CLI Version
amplify 4.18.1
Desktop (please complete the following information):
Thanks for reporting this. This issue was introduced in our older code where pluralization was done by appending s end the end of the model. The new sync resolvers does the pluralization correctly, but changing it for list query would break existing APIs. I am adding this to our backlog so we can do this without breaking the existing APIs.
For DataStore we do expose an additional parameter called pluralName which should be used for sync queries
Most helpful comment
Thanks for reporting this. This issue was introduced in our older code where pluralization was done by appending
send the end of the model. The new sync resolvers does the pluralization correctly, but changing it for list query would break existing APIs. I am adding this to our backlog so we can do this without breaking the existing APIs.For DataStore we do expose an additional parameter called
pluralNamewhich should be used for sync querieshttps://github.com/aws-amplify/amplify-cli/blob/4e92402e0b0fae30501972f3ad16203fc19ba287/packages/amplify-codegen-appsync-model-plugin/src/__tests__/visitors/__snapshots__/appsync-java-visitor.test.ts.snap#L23