We are building an amplify Gen2 app based on a SQL RDS data source. Recently I did an update to the schema, regenerated the schema.sql.ts file and pushed the changes to git. The deployment for that branch started and failed with these errors:
The input value type 'SurveyResponseInput' is not present when resolving type 'CreatePersonInput'
The input value type 'PersonInput' is not present when resolving type 'CreateSurveyResponseInput'
There seems to be some circular dependency that I could not resolve yet.
I have set the relationships in resource.ts as follows:
.setRelationships((models: any) => [
models.Person.relationships({
survey_responses: a.hasMany("SurveyResponse", "person_id"),
}),
models.SurveyResponse.relationships({
person: a.belongsTo("Person", "person_id")
})
])
Did anyone experience similar and can help me solve this?