-
Notifications
You must be signed in to change notification settings - Fork 198
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
Error in pluralization GraphQL Transform code or codegen #1443
Comments
Hi @sebsto, thanks for opening this issue. It looks like the library is not compatible with the latest Amplify CLI provisioning of the list query. The investigation can be followed here: aws-amplify/amplify-cli#8350 The workaround right now may be to downgrade to use the provisioning done by the CLI before 5.0.2 which will generate a different list query name that the library is aligned on. |
my workaround at the moment is to comment out the |
An easier way to bypass this is to set the feature flag to false
|
related: #1451 |
|
Please track #3135 |
Please use Amplify CLI 12.4.0 or greater to get the fix for the pluralization issue |
Describe the bug
Hello team,
I am following instructions provided by the Amplify iOS tutorial here
I am running into a strange error with the GraphQL API.
This call in the iOS app
Amplify.API.query(request: .list(NoteData.self)) { event in ...
causes this error
error GraphQL service returned a successful response containing errors: [Amplify.GraphQLError(message: "Validation error of type FieldUndefined: Field \'listNoteDatas\' in type \'Query\' is undefined @ \'listNoteDatas\'", locations: Optional([Amplify.GraphQLError.Location(line: 2, column: 3)]), path: nil, extensions: nil)]
Notice the
listNoteDatas
has an extra “s” at the end. The query, as seen from AppSync console, does not have that andit works in the console.
The schema is
I am testing with Amplify CLI 6.1.0 on macOS
I think this is a regression from Amplify 5.x
Amplify API Plugin 1.14.0
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
The query should return all notes
Amplify Framework Version
1.14.0
Amplify Categories
API
Dependency manager
Cocoapods
Swift version
5.5
CLI version
6.1.0
Xcode version
13
Relevant log output
error GraphQL service returned a successful response containing errors: [Amplify.GraphQLError(message: "Validation error of type FieldUndefined: Field \'listNoteDatas\' in type \'Query\' is undefined @ \'listNoteDatas\'", locations: Optional([Amplify.GraphQLError.Location(line: 2, column: 3)]), path: nil, extensions: nil)]
Is this a regression? (i.e. was this working before a version upgrade)
Yes.
Device
iOS Simulator
iOS Version
15
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: