【发布时间】:2019-05-14 12:00:15
【问题描述】:
我想将表格中的配置分配给响应。 答案的 ID 不在配置中。在答案中有一个名为exam_id 的字段,这个exam_id 是配置的ID
我有什么:
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
}
我想要什么:
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
}
当我请求答案时,我想要响应中的配置。 因此,对于每个exam_id,配置表中都有一个特殊的配置行。
【问题讨论】:
标签: aws-amplify amplifyjs