Secondary index queries are missing field of complex types
Describe the bug I am adding a new field to an existing type that has four secondary indexes on them, each with a queryField sepecified.
When I do amplify push -y, the main query updates with the new field, however, the other queries do not get updated.
Amplify CLI Version 4.21.0
To Reproduce This seems to happen if the field references another type, but not if it is from a built in type.
- Create a type
- Add a secondary index with a queryField
- Push your changes
amplify push -y(I'm not sure if this is required or not) - Add a field that references another type (but not a built in type), example:
type NotificationSettings {
resourceComments: Boolean
}
type User @model
@key(name: "byEmail", fields: ["email"], queryField: "getUsersByEmail")
{
id: ID!
email: String!
notificationSettings: NotificationSettings
}
- Do another push
amplify push -y
Expected behavior
The graphQL query generated for getUsersByEmail should contain the "notificationSetting" object.
Desktop (please complete the following information):
- OS: Windows 10
- Node Version. 12.16.1
It looks like the "list" queries are also not updated
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.