Generated models with fields with @connection directive form invalid GraphQLRequest when attempting to update #828
Labels
api
Issues related to the API category
bug
Something isn't working
pending-release
Code has been merged but pending release Code has been merged but pending release
Milestone
Describe the bug
After generating models via
amplify codegen models
from a schema model with@connection
directive, the update mutations will fail. This is due to the fact that the@connection
fields are defined on the models and will be passed into the mutation.An error will occur along of the lines of:
The variables input contains a field name \'notes\' that is not defined for input object type \'UpdateTaskInput\'
To Reproduce
Steps to reproduce the behavior from scratch:
Observed Behavior
The update results in a GraphQL error since
notes
will be passed into the mutation, even though it's only used to establish a one-to-many relationship.Resulting error message:
Expected Behavior
The update should be successful
Environment(please complete the following information):
Xcode Version: 12.0.1
Device Information (please complete the following information):
Tested in simulators
The text was updated successfully, but these errors were encountered: