I would like to assign configs from a table to responses. The ID of the answer is not in the configs. In the answer there is a field called exam_id and this exam_id is the ID of the config
what i have:
type Answer @model {
id: ID!
exam_id: String!
user: User! @connection(name: "Answers")
cycle: Int
user_input: AWSJSON
aivy_output: AWSJSON
final_scores: AWSJSON
score: Int
rating: Int
createdAt: String
updatedAt: String
}
type ExamConfig @model {
id: ID!
item_count: Int
zscore_mean: AWSJSON
zscore_deviation: AWSJSON
}
what i want:
type Answer @model {
id: ID!
exam_id: String! // = TOWER_OF_LONDON
config: ExamConfig @connection //BUT it have to be exam_id == ID from Config
user: User! @connection(name: "Answers")
cycle: Int
user_input: AWSJSON
aivy_output: AWSJSON
final_scores: AWSJSON
score: Int
rating: Int
createdAt: String
updatedAt: String
}
type ExamConfig @model {
**** id: ID! // = TOWER_OF_LONDON
item_count: Int
zscore_mean: AWSJSON
zscore_deviation: AWSJSON
}
when i request a Answer, than i want the config in the response. So for every exam_id is a special config row in the config Table.